Database Coding Standards and Guidelines Part 1: naming rules for tables, stored procedures, triggers, indexes, primary keys and foreign keys.
Coding Standards: A Short Guide and a Practical Naming Check
Useful SQL coding standards give teams a short rule set with clear exceptions. Run a read-only naming report, check literal underscores in procedure prefixes and review the results before changing objects.
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.
SQL SERVER – 2005 Change Database Compatible Level – Backward Compatibility – Part 2 – Management Studio
How to change database compatible level in SQL Server Management Studio: right click the database, open Properties, then Options, and pick the level you need.
SQL SERVER – Primary Key Must Not Contain NULL – Primary Key are NOT NULL
Can you have a nullable primary key? No. A primary key must not contain NULL: Allow Nulls cannot be set on its columns, and all values must be unique.










