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 [...]
Archive for the ‘SQL Coding Standards’ Category
SQL SERVER – Questions and Answers with Database Administrators
Posted in Best Practices, Pinal Dave, SQL, SQL Authority, SQL Coding Standards, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology on May 11, 2009 | 8 Comments »
SQL Server – 2008 – Cheat Sheet – One Page PDF Download
Posted in Best Practices, DBA, Database, Pinal Dave, SQL, SQL Add-On, SQL Authority, SQL Coding Standards, SQL Documentation, SQL Download, SQL Interview Questions and Answers, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, SQL Utility, Software Development, T SQL, Technology, tagged SQL Cheat Sheet on October 2, 2008 | 22 Comments »
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 [...]
SQL SERVER – Guidelines and Coding Standards Complete List Download
Posted in Best Practices, DBA, Data Warehousing, Database, Pinal Dave, SQL, SQL Authority, SQL Coding Standards, SQL Constraint and Keys, SQL Cursor, SQL Data Storage, SQL Documentation, SQL Download, SQL Function, SQL Index, SQL Joins, SQL Performance, SQL Query, SQL Scripts, SQL Security, SQL Server, SQL Stored Procedure, SQL Tips and Tricks, SQL Trigger, SQL Utility, SQLAuthority, T SQL, Technology on September 25, 2008 | 9 Comments »
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 [...]
SQL SERVER – Guidelines and Coding Standards Part – 2
Posted in Best Practices, Database, Pinal Dave, SQL, SQL Authority, SQL Coding Standards, SQL Documentation, SQL Performance, SQL Query, SQL Scripts, SQL Server, SQL Stored Procedure, SQL Tips and Tricks, Software Development, T SQL, Technology on September 24, 2008 | 10 Comments »
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 [...]
SQL SERVER – Guidelines and Coding Standards Part – 1
Posted in Best Practices, Database, Pinal Dave, SQL, SQL Authority, SQL Coding Standards, SQL Constraint and Keys, SQL Documentation, SQL Index, SQL Joins, SQL Performance, SQL Query, SQL Scripts, SQL Server, SQL Stored Procedure, SQL Tips and Tricks, Software Development, T SQL, Technology on September 23, 2008 | 20 Comments »
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 [...]
SQL SERVER – 2008 – Introduction to Policy Management – Enforcing Rules on SQL Server
Posted in Pinal Dave, SQL, SQL Authority, SQL Coding Standards, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology, tagged Policy Management on June 13, 2008 | 3 Comments »
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 [...]
SQL SERVER – Four Basic SQL Statements – SQL Operations
Posted in Database, Pinal Dave, SQL, SQL Authority, SQL Coding Standards, SQL Query, SQL Server, SQL Tips and Tricks, Software Development, T SQL, Technology on May 13, 2008 | 4 Comments »
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 [...]
SQL SERVER – Add Column With Default Column Constraint to Table
Posted in Pinal Dave, SQL, SQL Authority, SQL Coding Standards, SQL Constraint and Keys, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology on March 19, 2008 | 8 Comments »
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 [...]
SQLAuthority News – Best Articles on SQLAuthority.com
Posted in DBA, Data Warehousing, Database, Pinal Dave, SQL, SQL Add-On, SQL Authority, SQL Backup and Restore, SQL Coding Standards, SQL Constraint and Keys, SQL Cursor, SQL DateTime, SQL Documentation, SQL Download, SQL Error Messages, SQL Function, SQL Humor, SQL Index, SQL Interview Questions and Answers, SQL Joins, SQL Performance, SQL Query, SQL Scripts, SQL Security, SQL Server, SQL Server DBCC, SQL Stored Procedure, SQL Tips and Tricks, SQL Trigger, SQL Utility, Software Development, T SQL, Technology on November 4, 2007 | 5 Comments »
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 [...]
SQLAuthority News – Best SQLAuthority Articles on Other Popular Sites
Posted in Pinal Dave, SQL, SQL Authority, SQL Coding Standards, SQL Function, SQL Query, SQL Server, SQL Stored Procedure, SQL Tips and Tricks, SQLAuthority Website Review, T SQL, Technology on November 3, 2007 | Leave a Comment »
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)
About Pinal Dave
Pinalkumar Dave is a Microsoft SQL Server MVP and a Mentor for Solid Quality India. He has written over 1100 articles on the subject on his blog at http://blog.sqlauthority.com. He is a dynamic and proficient Principal Database Architect, Corporate Trainer and Project Manager, who specializes in SQL Server Programming and has 7 years of hands-on experience. He holds a Masters of Science degree and a number of certifications, including MCDBA and MCAD (.NET). He was awarded Regional Mentor for PASS Asia.
-
Blog Stats
- 10,988,781 Readers
SQLAuthority Links

My Homepage
My Resume
My Other Blog
--------------------
Top Downloads
PDF Downloads
Script Downloads
Script Bank
Favorite Scripts
All Scripts - 1
All Scripts - 2
Top Articles
Best Articles
Favorite Articles - 1
Favorite Articles - 2
--------------------
SQL Interview Q & A
SQL Coding Standards
SQL FAQ Download
--------------------
Jobs @ SQLAuthority
Top 7 Commenters
365 - Imran Mohammed
138- Brian Tkatch
57 - Tejas Shah
56 - Jacob Sebastian
47 - Jerry Hung
46 - Kuldip Bhatt
43 - Ashish GilhotraCategories
- About Me (61)
- Best Practices (91)
- Business Intelligence (14)
- Data Warehousing (30)
- Database (270)
- DBA (126)
- MVP (98)
- Poll (5)
- Readers Contribution (37)
- Readers Question (45)
- Software Development (67)
- SQL Add-On (91)
- SQL Backup and Restore (54)
- SQL BOL (10)
- SQL Coding Standards (20)
- SQL Constraint and Keys (51)
- SQL Cursor (28)
- SQL Data Storage (45)
- SQL DateTime (37)
- SQL Documentation (219)
- SQL Download (222)
- SQL Error Messages (125)
- SQL Function (124)
- SQL Humor (25)
- SQL Index (98)
- SQL Interview Questions and Answers (58)
- SQL Joins (64)
- SQL Optimization (66)
- SQL Performance (223)
- SQL Puzzle (26)
- SQL Security (119)
- SQL Server DBCC (42)
- SQL Server Management Studio (28)
- SQL Stored Procedure (102)
- SQL String (19)
- SQL System Table (50)
- SQL Trigger (24)
- SQL User Group (48)
- SQL Utility (126)
- SQL White Papers (37)
- SQLAuthority (376)
- SQL Training (1)
- SQLAuthority Author Visit (80)
- SQLAuthority Book Review (19)
- SQLAuthority News (346)
- SQLAuthority Website Review (29)
- SQLServer (77)
- Tech (916)
- Pinal Dave (906)
- SQL Scripts (533)
- Technology (1159)
- SQL (1159)
- SQL Authority (1159)
- SQL Query (1159)
- SQL Server (1159)
- SQL Tips and Tricks (1159)
- T SQL (1159)
-
Top Posts
- SQL SERVER - Insert Data From One Table to Another Table - INSERT INTO SELECT - SELECT INTO TABLE
- SQL SERVER - Insert Multiple Records Using One Insert Statement - Use of UNION ALL
- SQL SERVER - Retrieve Current Date Time in SQL Server CURRENT_TIMESTAMP, GETDATE(), {fn NOW()}
- SQL SERVER - Import CSV File Into SQL Server Using Bulk Insert - Load Comma Delimited File Into SQL Server
- SQL SERVER - Convert Text to Numbers (Integer) - CAST and CONVERT
- SQL Server Interview Questions and Answers Complete List Download
- SQL SERVER - 2005 - Create Script to Copy Database Schema and All The Objects - Stored Procedure, Functions, Triggers, Tables, Views, Constraints and All Other Database Objects
- SQL SERVER - Shrinking Truncate Log File - Log Full
- SQL SERVER - Restore Database Backup using SQL Script (T-SQL)
- SQL SERVER - 2005 List All Tables of Database
- SQL SERVER - 2008 - Interview Questions and Answers Complete List Download
- SQL Server Interview Questions and Answers - Part 1
-
Authors
-
pinaldave
- SQLAuthority News – SQL Server 2008 for Oracle DBA
- SQLAuthority News – Book Review – Expert SQL Server 2008 Encryption by Michael Coles
- SQL SERVER – Understanding Table Hints with Examples
- SQL SERVER – Size of Index Table – A Puzzle to Find Index Size for Each Index on Table
- SQL SERVER – 2005 2008 – Backup, Integrity Check and Index Optimization By Ola Hallengren
- SQLAuthority News – Notes of Excellent Experience at SQL PASS 2009 Summit, Seattle
- SQL SERVER – Whitepaper Consolidation Using SQL Server 2008
- SQLAuthority News – Disk Partition Alignment Best Practices for SQL Server
- SQL SERVER – Policy Based Management – Create, Evaluate and Fix Policies
- SQL SERVER – Disable CHECK Constraint – Enable CHECK Constraint
-
Archives
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
Pages
Category Cloud
About Me Best Practices Database DBA MVP Pinal Dave Software Development SQL SQL Add-On SQL Authority SQLAuthority Author Visit SQLAuthority News SQL Documentation SQL Download SQL Error Messages SQL Function SQL Index SQL Joins SQL Optimization SQL Performance SQL Query SQL Scripts SQL Security SQLServer SQL Server SQL Stored Procedure SQL Tips and Tricks SQL Utility Technology T SQL


