Find total Number of columns in a Table in SQL Database

SQL Comments Off on Find total Number of columns in a Table in SQL Database

SQL Query to find total number of columns in a Table in SQL Database,

SELECT COUNT(*)
  FROM INFORMATION_SCHEMA.COLUMNS
 WHERE table_catalog = 'DatabaseName' -- the database
   AND table_name = 'TableName'



Author

Search

Back to Top