SQL SERVER – Guidelines and Coding Standards Part – 2

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 a single line as comment use (–) before the statement.…
Read More

SQL SERVER – Guidelines and Coding Standards Part – 1

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_…
Read More

SQL SERVER – 2008 – Interview Questions and Answers – Part 5

Click here to get free chapters (PDF) in the mailbox SQL SERVER – 2008 – Interview Questions and Answers Complete List Download What command do we use to rename a db, a table and a column? To rename db sp_renamedb 'oldname' , 'newname' If someone is using db it will…
Read More

SQL SERVER – 2008 – Interview Questions and Answers – Part 4

Click here to get free chapters (PDF) in the mailbox SQL SERVER – 2008 – Interview Questions and Answers Complete List Download 1) General Questions of SQL SERVER Which command using Query Analyzer will give you the version of SQL server and operating system? SELECT SERVERPROPERTY ('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY…
Read More

SQL SERVER – 2008 – Interview Questions and Answers – Part 1

Click here to get free chapters (PDF) in the mailbox SQL SERVER – 2008 – Interview Questions and Answers Complete List Download 1) General Questions of SQL SERVER What is RDBMS? Relational Data Base Management Systems (RDBMS) are database management systems that maintain data records and indices in tables. Relationships…
Read More