Log in | Register

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

Transact-SQL

SQLServerGeeks Annual Summit 2016 IS HAPPENING IN BANGALORE. HAVE YOU REGISTERED?

Explore statistics histogram using SQL Server 2017

Prior to SQL Server 2016 SP1 CU2, we need to use DBCC SHOW_STATISTICS WITH HISTOGRAM to read Statistics histogram of a specific statistics. Since it is a DBCC command in order to filter any information or if you want to join with another table, we first need to save the out to a table.

Below […]

By |October 7th, 2017|Categories: Performance Tuning, Programming, Query Tuning, SQL Server, Transact-SQL|Tags: , , , , , |Comments Off on Explore statistics histogram using SQL Server 2017

SQL SERVER 2017 – IDENTITY_CACHE

When we define a table with Identity column, SQL Server might cache the identity values to improve performance. Due to server restart or database failure some assigned values may be lost.  If your application required to have consecutive values, then having identity column was the right choice prior to SQL Server 2017.

You need to […]

By |September 25th, 2017|Categories: Programming, SQL Server, Transact-SQL|Tags: , , , |Comments Off on SQL SERVER 2017 – IDENTITY_CACHE

SQL Server 2017 New String Function – CONCAT_WS

String manipulation is one of the common requirement for every project. There are many String functions already available in SQL Server but in SQL Server 2017 has some more string functions which ease the developer’s life. CONCAT_WS string function is one of them.

CONCAT_WS :

It concatenates a variable numbers of strings using the first argument as […]

By |September 16th, 2017|Categories: Programming, SQL Server, Transact-SQL|Tags: , , |Comments Off on SQL Server 2017 New String Function – CONCAT_WS

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 […]

By |May 7th, 2017|Categories: Database Development, Performance, SQL Server, Transact-SQL|Tags: , |Comments Off on SQL Server – ROW_NUMBER versus TOP N

Compare Query plan using SSMS

Recently Microsoft released SSMS 17.0. This release of SSMS supports SQL Server 2017 for both running on Windows and Linux. In this release Microsoft has added new features as well as improved some existing features. One of them is to Compare Query plan.

You can download latest SSMS 17.0 here

This is helpful where you have […]

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 […]

By |May 5th, 2017|Categories: Database Development, Programming, SQL Server, Transact-SQL|Tags: , |Comments Off on SQL Server 2017 – SELECT INTO on FileGroup

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 […]

By |April 16th, 2017|Categories: Database Administration, Database Development, Performance, SQL Server, Transact-SQL|Tags: , , , |Comments Off on Database Scoped Configurations and Trace flag 4199

SQL Server 2016 – Two things developers should know

Hello Friends,

There are lots of new features and improvement launched by Microsoft in SQL Server 2016. There are two small but really interesting things for the T-SQL Developers, DBA Developers who are involve in writing T-SQL code.

Situation: Let’s think about a situation where we are creating a new object (for example –  Stored Procedure) […]

By |April 3rd, 2017|Categories: SQL Server, Transact-SQL|Tags: , |Comments Off on SQL Server 2016 – Two things developers should know

DBCC CloneDatabase

This blog was due from a long time.  With the release of SQL Server 2014 Service pack 2, a new DBCC command included that is DBCC CloneDatabase. My primary job role is to do query tuning and I was looking for this kind of functionality. Using this command, it is quite easy   to copy […]

By |March 15th, 2017|Categories: Database Administration, Performance, Transact-SQL|Tags: , , |Comments Off on DBCC CloneDatabase

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 […]

By |March 8th, 2017|Categories: Database Development, Programming, SQL Server, Transact-SQL|Tags: , |Comments Off on New Function String_Split in SQL Server 2016
Newsletter_Footer