Posts Tagged ‘SQL Server Management Studio’

The post contains a simple query to find the number of columns in your sql sever table.


SELECT COUNT(COLUMN_NAME) FROM INFORMATION_SCHEMA.COLUMNS WHERE
TABLE_CATALOG = 'databse_name' AND TABLE_SCHEMA = 'dbo'
AND TABLE_NAME = 'table_name'

Advertisements