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.
SQL SERVER – Retrieve – Select Only Date Part From DateTime – Best Practice – Part 2
Which way to select only date part from DATETIME is faster? After more tests on large tables, I now suggest the DATEADD and DATEDIFF method over CONVERT.
SQLAuthority News – SQL Injection – SQL Joke, SQL Humor, SQL Laugh
The SQL Injection cartoon readers sent me many times, finally on the blog. Plus a demo of how dynamic SQL opens the door to it, and a way to close it.
What Is a Database Schema in SQL Server?
A database schema is a namespace inside a database. What dbo really is, why two tables can carry the same name, how a schema makes permissions something you set once, and why naming it in your code saves you from odd bugs.
SQL SERVER – Guidelines and Coding Standards Complete List Download
My coding standards complete list for SQL Server, cut to what people follow: naming, formatting, and the rules that prevent real bugs.
SQL SERVER – Guidelines and Coding Standards Part – 2
Part 2 of my Guidelines and Coding Standards: nest single quotes, add parentheses for readability, use IF EXISTS with SELECT 1, and avoid the SP_ prefix.
SQL SERVER – Guidelines and Coding Standards Part 1
Guidelines and Coding Standards Part 1: Pascal naming for tables, and naming patterns for stored procedures, triggers, indexes and keys.






