sql count column
-- Oracle SELECT count(*) FROM ALL_TAB_COLUMNS WHERE OWNER='owner_name' AND TABLE_NAME = 'table_name'; -- SQL Server / MySQL SELECT count(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'schema_name' AND TABLE_NAME = 'table_name';