I am trying to write a query that gets table information from a database SQL CE, ready to be installed in C #, and then exported to XML. I need one of the columns named IDENT with a boolean value (to represent if this is really an identity column).
To do this, I check if the AUTOINC_SEED column is zero:
select isnull(AUTOINC_SEED) as IDENT from information_schema.columns
However, this returns TRUE for non-identity columns and FALSE for identity columns! Is there a way to change the boolean value inside the select statement?
Editing: I know what a case statement could do to solve this particular problem, but I was curious about inverting Boolean (bit) values in SQL.
source
share