Marko Parkkola from Finland shares a best practice for enumerations in relational database design: the right way to store them and one clearly wrong way.
SQL Injection: How It Works and How to Stop It
Prevent SQL injection by separating values from command text, parameterizing dynamic SQL, and validating object names before using QUOTENAME.
SQL SERVER- IF EXISTS(Select null from table) vs IF EXISTS(Select 1 from table)
Is IF EXISTS(Select null from table) faster than IF EXISTS(Select 1 from table)? A great comment thread by Divya, Brian and Marko answers it.
Stored Procedure Optimization Tips That Still Matter
Stored Procedure Optimization comes down to a short list of habits you can test on your own server. This post builds one badly written procedure and one good one on a small orders table, then measures the difference in logical reads. It also covers parameter sniffing, the sp_ prefix, short transactions and error handling.
UPDATE With a JOIN: Changing Rows From Another Table Safely
Use UPDATE with a JOIN safely, reject duplicate source keys, compare subquery and MERGE behavior, and verify the affected rows.
The First Hour on a Server Nobody Can Explain
Investigate a slow SQL Server in a fixed order, checking connectivity, blocking, waits, plans, and storage before changing the environment.
Preparing a Demo That Does Not Fail on Stage
Prepare a demo with scripts, clean resets, offline backup material, and a recovery route that keeps the lesson moving when a live step fails.






