Expanding tables in WideWorldImporters in SSMS 2016, you see an icon like a watch. It marks a System-Versioned table, also known as a temporal table.
Building Full Folder Paths From a Parent-Child Table
Your folder table stores only a name and a parent, so the full path has to be walked. I show the query, and how to catch the rows it quietly leaves out.
What Breaks If I Drop This Column? sys.sql_expression_dependencies
Use sql_expression_dependencies and referencing-entity queries before a column change, then check module text and external callers for gaps.
Counting Partitions per Table and Spotting Empty Ones
A quick count said 8 partitions, but the table has 4. Here is where the extra rows came from and how to spot empty partitions.
Interview Question of the Week #054 – Retrieve User Defined Object Details from sys.objects
A favorite interview script: how to retrieve user defined object details from sys.objects in SQL Server, with the query to run.
max_length in sys.columns: Bytes, Not Characters
Your generated column came out twice as wide as the original. Here is why max_length counts bytes and how to turn it back into a real declaration.
SQL SERVER – What is is_not_trusted in sys.foreign_keys?
What does the is_not_trusted column in sys.foreign_keys mean? Books Online is not very clear, so I explain it with a simple example using three tables.






