Return columns that accept boolean in a table

2

I need a query that brings the names of the columns in a table that accept boolean . Ex: In the clientes table, I have the fields casapropria (1 for yes, 0 for no), temfilhos (1 for yes, 0 for no).

    
asked by anonymous 16.07.2015 / 16:13

2 answers

2
SELECT column_name FROM information_schema.columns
    WHERE table_name = 'clientes' AND data_type = 'bit'
    
16.07.2015 / 16:19
1

Galera, I just got it. Follow if it is useful to you

    
16.07.2015 / 16:18