devxlogo

October 19, 2017

Identify Tables with Large Column Counts

You can identify tables with a huge column count in the following way: DECLARE @limit INT;SET @limit = 30; –MAX 30 Columns;WITH c([object_id], [column count]) AS( SELECT [object_id], COUNT(*) FROM