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