James Burnie Mcburnie James Burnie Mcburnie - 1 month ago 6
SQL Question

SQL Query to get any column who's value can be Bit

Would anybody be able to shed some light on how i go about getting only columns who's type are Bit ( bool ) without having to set limits on queries?
I am currently able to return every column but that will confuse the built in Query in my program if an int column gets selected.

SELECT COLUMN_NAME
FROM databasex.INFORMATION_SCHEMA.COLUMNS
WHERE [..?..]


any help or advice would be appreciated. thanks

Answer
select * from 
information_schema.columns
 where data_type='bit'
Comments