count(*) column in mssql code example Example: get number of table colums in sql query select count(*) from tablename