SQL Server Database Coding Standards and Guidelines – Part 1
SQL SERVER – Database Coding Standards and Guidelines – Introduction
I have received many many request to do another series since my series SQL Server Interview Questions and Answers Complete List Download. I have created small series of Coding Standards and Guidelines, as this is the second most request I have received from readers. This document can be extremely long but I have limited to very few pages as it is difficult to follow thousands of the rules. My experience says it is more productive developer and better code if coding standard has important fewer rules than lots of micro rules.
SQL SERVER – Retrieve Information of SQL Server Agent Jobs
sp_help_job returns information about jobs that are used by SQL Server Agent service to perform automated activities in SQL Server. When executed sp_help_job procedure with no parameters to return the information for all of the jobs currently defined in the msdb database.
SQL SERVER – Change Default Fill Factor For Index
SQL Server has default value for fill factor is Zero (0). The fill factor is implemented only when the index is created; it is not maintained after the index is created as data is added, deleted, or updated in the table. When creating an index, you can specify a fill factor to leave extra gaps and reserve a percentage of free space on each leaf level page of the index to accommodate future expansion in the storage of the table’s data and reduce the potential for page splits. Let us learn about how to change default fill factor of index.
SQL SERVER – NorthWind Database or AdventureWorks Database – Samples Databases
SQL Server 2005 does not install sample databases by default due to security reasons.I have received many questions regarding where is sample database in SQL Server 2005. One can install it afterward. AdventureWorks and AdvetureWorksDS are the new sample databases for SQL Server 2005, they can be download from here. Let us learn how to install NorthWind Database – samples databases.Â
SQL SERVER – 2005 Comparison EXCEPT operator vs. NOT IN
The EXCEPT operator returns all of the distinct rows from the query to the left of the EXCEPT operator when there are no matching rows in the right query. The EXCEPT operator is equivalent of the Left Anti Semi Join. EXCEPT operator works the same way NOT IN. EXCEPTS returns any distinct values from the query to the left of the EXCEPT operand that do not also return from the right query.