Total Pageviews

Statistics in SQL Server


Statistics determine the selectivity of the indexes. If an indexed column has unique values then the selectivity of that index is more, as opposed to an index with non-unique values. Query optimizer uses these indexes in determining whether to choose an index or not while executing a query.

Error Function

Below are some error functions, which help us in debugging:-

Function Name
Description
ERROR_MESSAGE()
Returns the complete description of the error message
ERROR_NUMBER()
Returns the number of the error
ERROR_SEVERITY()
Returns the number of the Severity
ERROR_STATE()
Returns the error state number
ERROR_PROCEDURE()
Returns the name of the stored procedure where the error occurred
ERROR_LINE()
Returns the line number that caused the error


FacebookPage