How do you create a Temp Table from a stored procedure when you do not know its result set? Here is the OPENROWSET approach I use, and its drawbacks.
ROWCOUNT and PAGECOUNT: Faking a Big Table to Test Plans
You can tell the optimizer a three-row table has 10 million rows and watch the plan change. Here is how, and how to undo it.
How is Oracle Temporary Table Different from SQL Server? – Interview Question of the Week #133
How is an Oracle temporary table different from SQL Server temp tables? A question from our hiring interviews, with the syntax on both sides.
SQL SERVER – Interesting Observation – Count of Temporary Table Re-generations
A workshop attendee asked how to know the count of temporary table re-generations for a single temp table. Here is how I find it.
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.
How to Insert Results of Stored Procedure into a Temporary Table? – Interview Question of the Week #124
How to insert results of stored procedure into a temporary table without creating the table first? Here is a simple script that shows the steps.
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.







