A DROP STATISTICS script can remove every auto-created statistic in a database, and SQL Server builds the useful ones again on demand. This post previews the statements, runs them behind a switch and shows what happens to the next query. It also says when the cleanup helps.
What are Different Methods to Know the Row Count of Table? – Interview Question of the Week #261
Question: What are Different Methods to Know the Row Count of Table? The answer to this question is very simple and many.
Get Partition Info in SQL Server: Rows and Boundaries
To get partition info in SQL Server, join sys.partitions to the partition scheme, function and filegroup views. This post builds a small partitioned table, lists every partition with its boundaries, row count and filegroup, and shows how to find the partition for a value. It also lists the tables that have more than one partition.
Tables Containing a Column: Search by Name in SQL Server
To find tables containing a column, search sys.columns by name instead of opening tables one by one. This post searches one database, then every database on the server, and shows why an underscore in the pattern needs brackets. It also compares the data types of related columns.
A Schedule Table That Repeats Every Other Week
Build an every other week schedule in T-SQL, skip holiday dates, find the next occurrence, and check rota weeks from one anchor.
How to Find Definition of Computed Column in SQL Server using T-SQL? – Interview Question of the Week #233
Question: How to Find Definition of Computed Column in SQL Server using T-SQL?
Answer: A very fair question, I received the other day.







