MySQL: Count Columns Per Row -
i want know if counting columns possible you're counting rows without calling each column name. example:
select count(found columns) counted table a_value exists in columns  /*   same specified one. working i'm  looking approach without calling each column name.  select (if(col1="y",1,0) + if(col2="y",1,0)) counted table  */   which wish throw results per row like:
|  counted  | |-----------| |     2     | |     1     | |     0     |   is possible? if yes, how?
select count(column_name)  information_schema.columns  table_catalog = 'database' , table_schema = 'dbo' , table_name = 'table'   try work.
Comments
Post a Comment