sql - MySQL and get column headers where cell equals value -


i have sql table many columns (40+). first column id column , rest columns take values of 0 or 1. there query in can search row , see "cells" equal 1 , return column name?

for example, id 5 , columns 4,9,23 each have 1 row (all others zero). therefore want return "column4","column9" , "column23" result. need id stipulation in there know row examine.

any ideas? thanks!


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -