SQL Server – Error handling using Throw
MS-SQL Server 2012 introduced a new way of error handling using THROW statement. Prior to SQL Server 2012 we had to use RAISEERROR for error handling. Throw statement raises an exception and transfers...
View ArticleSQL Server– Template Explorer
Yesterday when I was about to leave office , I got a call on my mobile from one of my friend. He wanted to know how to write a recursive query? I said use Template Explorer, Where you can get examples...
View ArticleSQL Server– Unique Constraint VS Unique Index
Both Unique constraint and Unique Index enforces uniqueness of the column. When we define an Unique constraint, SQL server creates an Unique non clustered index on the column where Unique constraint is...
View ArticleSQL SERVER – Trace Flags
To know about a topic we usually ask questions. Here I used the same method to explain about trace flag of SQL Server. Below are some questions related to trace flags. What is the use of Trace Flag?...
View ArticleSQL Server – New Analytical functions in SQL Server 2012 – Lead and Lag
LAG: Using this function we can fetch the nth row before (Lag) the Current row without using self-join. It is useful when we need to compare the current row values with values in a previous row....
View ArticleSQL Server: Identity Property Part-1
Identity property is one of the most frequently used properties to generate auto increment value. I’ve seen sometime developer get confused with it. So this blog series will help developers to know...
View ArticleSQL Server: Identity Property Part – 2
In this blog series, I’m covering all about Identity property. This is the second part of this series. You can read the first part here (SQL Server: Identity Property Part – 1). After reading this post...
View ArticleSQL Server – Identity Property Part – 3
This is third part of this blog series. You can read the 2nd part here (SQL Server: Identity Property Part – 2). In this blog post we’ll learn how to retrieve last generated identity value. There are...
View Article
More Pages to Explore .....