how to count number of columns in a table in mysql

Solutions on MaxInterview for how to count number of columns in a table in mysql by the best coders in the world

showing results for - "how to count number of columns in a table in mysql"
Isabelle
25 Nov 2018
1-- Oracle
2SELECT count(*) FROM ALL_TAB_COLUMNS WHERE OWNER='owner_name' 
3	AND TABLE_NAME = 'table_name';
4-- SQL Server / MySQL
5SELECT count(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'schema_name' 
6	AND TABLE_NAME = 'table_name';