sql - MySQL count columns in table by name -
is possible count number of columns in table name?
eg
select count(*) information_schema.columns column '%name%' , table_schema = 'db_name' , table_name = 'table_name'
i have table adds columns table custom fields added user , need count added columns use result in while loop
yes, possible. there's chance need use column_name
in where
in place of column
-- @ least, that's how listed in mysql docs:
select count(*) information_schema.columns column_name '%name%' , table_schema = 'db_name' , table_name = 'table_name'
Comments
Post a Comment