Re: cast bit to boolean?
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Hentosh <hentosh@io.com>
Cc: pgsql-general@postgresql.org
Date: 2001-05-03T23:09:13Z
Lists: pgsql-general
Robert Hentosh <hentosh@io.com> writes: > If you want only the rows where both bits are set then try: > > select * from t1 where ( sel_a & b'100001' = b'100001' ); Or for the other case, select * from t1 where ( sel_a & b'100001' != b'000000'); regards, tom lane