Coding Standards and Guidelines Introduction: after my interview questions series, readers asked for coding standards, so I kept this set short and practical.
SQL SERVER – 2005 Explanation and Example – SELF JOIN
A self join joins a table to itself with table aliases. When to use one, why the joined columns must share a data type, and an employee example.
Sending Query Results by Email
Sending query results by email with Database Mail requires clear formatting, tested delivery, safe attachments, and size limits.
Searching Every Stored Procedure for a Word
Searching every stored procedure through sys.sql_modules finds text quickly, but comments, case, dynamic SQL, and other databases need care.
SQL SERVER – 2005 Constraint on VARCHAR(MAX) Field To Limit It Certain Length
SQL Server 2005 has no VARCHAR(12500), so how do you cap a VARCHAR(MAX) field at 12500 characters? A constraint on the column does the job.
SQL SERVER – Retrieve Information of SQL Server Agent Jobs
sp_help_job returns information about SQL Server Agent jobs in msdb. Run it with no parameters to list every job, plus a few related Agent posts.






