Feeds:
Posts
Comments

Archive for the ‘SQL Coding Standards’ Category

I have been in India for long time now, and at present, I am managing a very large outsourcing project. Recently, we conducted few interviews since the project required more Database Administrators and Senior Developers, and I must say it was an enthralling experience for me! I got the opportunity to meet some very talented [...]

Read Full Post »

Very frequently I have been asked to create a page, post or article where in one page all the important concepts of SQL Server are covered. SQL Server 2008 is very large subject and can not be even covered 1000 of pages. In daily life of DBA there are few commands very frequently used and [...]

Read Full Post »

SQL SERVER – Guidelines and Coding Standards complete List Download
Coding standards and guidelines are very important for any developer on the path of successful career. A coding standard is a set of guidelines, rules and regulations on how to write code. Coding standards should be flexible enough or should take care of the situation where [...]

Read Full Post »

To express apostrophe within a string, nest single quotes (two single quotes).
Example:
SET @sExample = ‘SQL’’s Authority’

When working with branch conditions or complicated expressions, use parenthesis to increase readability.
IF ((SELECT 1
FROM TableName
WHERE 1=2) ISNULL)

To mark single line as comment use (–) before statement. To mark section of code as comment use (/*…*/).

Avoid the [...]

Read Full Post »

Use “Pascal” notation for SQL server Objects Like Tables, Views, Stored Procedures. Also tables and views should have ending “s”.
Example:
UserDetails
Emails

If you have big subset of table group than it makes sense to give prefix for this table group. Prefix should be separated by _.
Example:
Page_ UserDetails
Page_ Emails

Use following naming convention for Stored [...]

Read Full Post »

I have previous written article about SQL SERVER Database Coding Standards and Guidelines Complete List Download. I just received question from one of the blog reader is there any way we can just prevent violation of company policy. Well Policy Management can come into handy in this scenario.
If our company policy is to create all [...]

Read Full Post »

There are four basic SQL Operations or SQL Statements.
SELECT – This statement selects data from database tables.
UPDATE – This statement updates existing data into database tables.
INSERT – This statement inserts new data into database tables.
DELETE – This statement deletes existing data from database tables.
If you want complete syntax for this four basic statement, please download [...]

Read Full Post »

Just a day ago while working with database Jr. Developer asked me question how to add column along with column constraint. He also wanted to specify the name of the constraint. The newly added column should not allow NULL value. He requested my help as he thought he might have to write many lines to [...]

Read Full Post »

SQL SERVER – Cursor to Kill All Process in Database
SQL SERVER – Find Stored Procedure Related to Table in Database – Search in All Stored procedure
SQL SERVER – Shrinking Truncate Log File – Log Full
SQL SERVER – Simple Example of Cursor
SQL SERVER – UDF – Function to Convert Text String to Title Case – Proper [...]

Read Full Post »

Best SQLAuthority Articles on Other Popular Sites
SQL SERVER – UDF vs. Stored Procedures and Having vs. WHERE (SQL Server Magazine)
SQL SERVER – Pre-Code Review Tips – Tips For Enforcing Coding Standards (dotnetslackers.com)
Reference : Pinal Dave (http://blog.SQLAuthority.com)

Read Full Post »

Older Posts »