Find the number of columns in a table in sql server

Find the number of columns in a table in sql server

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

2020-05-20