A quick script to check database integrity for all the databases on a server with DBCC CHECKDB and sp_msforeachdb, and how to read its output.
Why WHERE Runs Before SELECT
Learn logical query processing to understand WHERE, SELECT aliases, grouped filters, and ordering without confusing syntax with execution.
SQL SERVER – Refresh Database Using T-SQL
Can you refresh database in Object Explorer using a T-SQL query? No. But if cached objects changed, DBCC commands can clear the cache for you.
SQL SERVER – Clear Drop Down List of Recent Connection From SQL Server Management Studio
Is the SSMS connect drop down list full of old server names? Delete the mru.dat file for SQL Server 2005 or 2008 to clear it and start fresh.
SQL SERVER – Stored Procedure WITH ENCRYPTION and Execution Plan
Here is what I found about WITH ENCRYPTION and execution plan: an encrypted SP hides its actual execution plan too. Two sample SPs show it.
SQL SERVER – DECLARE Multiple Variables in One Statement
Yes, you can DECLARE multiple variables in one statement in SQL Server. Compare both methods side by side: one statement per variable, or all in one line.







