I get column names from schema-qualified table metadata. Catalog views help when I also need SQL Server-specific details.
Magic Numbers in Code: Replacing Status Codes With a Lookup Table
Nobody remembers what the 3 means. Give each status code an approved name, let the database enforce it, and leave your data alone.
SQL SERVER – Simple Query to List Size of the Table with Row Counts
A simple query I run at customer sites to list every table with its size in MB and Row Counts, including used and unused space.
SQL SERVER – How to Find Row Count of Every Table in Database Efficiently?
How do you find the row count of every table in a database without a cursor? An interview question, answered with a fast query instead of a loop.
Temporal History Queries: Indexing the History Table for Speed
Your current table is tiny, but the AS OF question hides in the history table. See the reads before and after a key-first index, and what it costs.
Currency Rates by Effective Date: Designing the Lookup Table
Why did last quarter’s invoices change overnight? Probably because the rate table had no dates. Here is a lookup that remembers.







