Count number of columns in table
select count(column_name) from information_schema.columns where table_name='foo';
Updated less than a minute ago
Did this page help you?
select count(column_name) from information_schema.columns where table_name='foo';
Updated less than a minute ago