Re: boolean/binary datatype
Posted in 1996
"Jason P. Williams" <jasonpw@umich.edu> wrote: :Thanks to the many of you who have chimed in regarding the use of the :command line mode vx. Informix's isql! :A second question (hopefully soon enough I will be able to contribute :things myself): :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. If you RTFM it will become obvious very soon there is no such datatype. Although you can use a smallint for the purpose, we usually use a char(1) and set it to Y or N or whatever. This saves a byte in every row. Also it make sure there are no surprises from some language who got confused about what smallint value meant true and false. There will be true boleans in Universal Server. May be they'll even occupy only 1 bit (or each 8 of them occupy one byte) but I wouldn't bet on that. Nils.Myklebust@ccmail.telemax.no NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway My opinions are those of my company