Say I have table:
table_name: animal column_names: "dog": 'f', "cat": 'f', "cow": 't' . . .
How can I display the column name "cow" ?
Thanks!
Only simple way to do that - checking directly each column:
select case when dog=true then 'dog' when cat=true then 'cat' when cow=true then 'cow' end as col from animal
2.1m questions
2.1m answers
60 comments
57.0k users