Log in | Register

Database Development Archives - SQL Server Blogs, Events, Webcasts, Videos, SQL Server learning & education Database Development Archives - SQL Server Blogs, Events, Webcasts, Videos, SQL Server learning & education

Database Development


SQL Server – ROW_NUMBER versus TOP N

Hello Friends,

This blog post is the result of question asked by some professionals working on databases. While writing T-SQL code they generally use TOP N in the code to get the top n number of rows in the result set. They knew the another way to achieve the same result by using ROW_NUMBER. Now the […]

SQL Server 2017 – SELECT INTO on FileGroup

Microsoft has announced SQL Server 2017 CTP version with lots of new features and improvements as compare to previous version i.e. SQL Server 2016. You can download the SQL Server 2017 in the fastest way as explained by Avanish in his recent post. In this blog post we will learn about the new feature […]

Database Scoped Configurations and Trace flag 4199

Those who are working on query performance whether you are a DBA or Developer I am sure you guys must have used trace flag 4199.  TF 4199 enables all query optimizer related fixes.Microsoft used to have separate TF for each hotfix applied to query optimizer prior to SQL Server 2005 Service Pack 3 (SP3) Cumulative […]

SQL Server 2016 – sys.dm_db_incremental_stats_properties for Incremental Stats

Hello Friends,

During various troubleshooting scenarios, we generally check the statistics information on the objects. These statistics information helps us a lot to detect the root cause. There is a DMF that we use to check the statistics information i.e. sys.dm_db_stats_properties. This DMF requires the object id and stats id to return the details.

SQL Server […]

New Function String_Split in SQL Server 2016

SQL Server 2016 has many features which makes developer life bit easy to do various task. Earlier to split a string developer use to write a user defined function using temp tables and complex logic. In almost every database I see a user defined function exists which does string split work. The project for […]

Customize your message using FORMATMESSAGE Function

Using FormatMessage function you can construct a message string located in sys.messages. The functionality of FORMATMESSAGE is very much same as RAISERROR statement. FORMATMESSAGE functions edits the message by substituting the supplied parameter values for placeholder variables in the message string.


FORMATMESSAGE ( { msg_number  | ‘ msg_string ‘ } , [ param_value [ ,…n […]

SQL Server 2014 – SELECT INTO Statement

Hi Friends,

Microsoft introduced so many new features and improvements with SQL Server 2014. In addition to these features, one of the improvement provided in SQL Server 2014 is about SELECT INTO statement. The SELECT INTO  generally used to copy the data from one table and inserts that data into a new table.

Before SQL Server […]

SQL Server 2016 – DML Operations on Temporal Table

Hello Friends,

In my previous blog posts, we have seen multiple ways for the creation of temporal table. You can go to those posts by clicking on below links:

SQL Server 2016 – Temporal Tables Part 1

SQL Server 2016 – Temporal Tables Part 2

SQL Server 2016 – Temporal Tables Part 3

Today, we will take a look […]

SQL Server 2016 – Temporal Tables Part 3

Hello Friends,

In my previous blog posts about temporal tables, we have seen three different ways for the creation of a temporal history table. First was the default where SQL Server create the table and assign a default name to that table. Second was where we specify the name of that table and SQL Server […]

Reserved threads and Used threads in parallelism

HI Friends,

We know about parallelism in SQL Server i.e. SQL Server uses multiple threads for the processing of a request to make it faster.  Two main important settings for the decision of going with parallelism are:

MAXDOP: Maximum degree of parallelism, This value represents, how many threads can be used for parallel processing.

The Cost threshold […]