Re: boolean/binary datatype
Posted in 1996
Richard Thomas — — source: Informix-list mailing list archive (1991-1998)
> Is there a boolean/binary datatype? My situation is that I am keeping > track of events (such as movies, concerts, etc) and I would like to be > able to classify each one as free or not-free (as in admission price). It > would be nice to have the attribute Free which could be either true or false. > Hi Jason, Not as far as I know. The way I handle things like this is to have a char(1) column, and put a check constraint on it when the table is built. You can then force the column to only accept the values you specify (eg "Y" or "N" etc). This takes less storage space than a smallint storing "0" or "1". Cheers, Richard.