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

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -