//
archives

Archive for

T-SQL Stored Procedure Tips

10 Things you should know when writing stored procedures 1)  Same case for T-SQL Keywords. Upper case is the generally accepted practice, just be consistent. 2)  Inspect input parameters for valid values (numbers, strings etc) 3) Use dynamic sql only when justified and absolutely necessary i.e. (SP_EXECUTESQL, EXEC(‘SELECT col1…..’) 4)  Commenting. Use comments profusely, they … Continue reading