Category: Version

How to enable Query store in sql server

Query store is a new powerful feature introduced in SQL 2016 which stores the query plan, statistics and query execution for current and past queries. You can enable it from SSMS ( 2016 and above) by clicking on the database and then on properties tab on the left side you can find query store. In

DIFFERENCE BETWEEN TWO DATES BY DATEDIFF_BIG

DIFFERENCE BETWEEN TWO DATES BY DATEDIFF_BIG: DATEDIFF_BIG is a new function introduced in SQL Server 2016. We will also see what is the difference between the DATEDIFF and the new DATEDIFF_BIG function. The syntax for DATEDIFF and DATEDIFF_BIG are both similar however DATEDIFF will return a int value and the DATEDIFF_BIG will return a big

SQL Server String Split function available in SQL Server 2016

Starting from SQL server 2016 we have new String split function which will help to split a string in rows. With earlier version of sql server a developer would have to create his own custom scripts to achieve this task. Syntax : STRING_SPLIT( ‘string’,’separator’). Split string will divide the input string using a separator into

Translate function in Sql server 2017

With the new translate function in SQL server 2017 you can now replace the string for multiple characters at the same time. In earlier version of SQL server with replace function we have to use replace multiple times if we have to replace the string multiple times . Below is the syntax for Translate function

Trim function in sql server 2017

Before Sql server 2017 we only had LTRIM and RTRIM function available to remove spaces from left and right separately.  With trim function now being available in sql server 2017 it can be used for two purposes. Lets look at the syntax of Trim function  first. TRIM ( [ characters FROM ] string ) Trim

SQL Server concat_ws function available starting 2017

SQL Server concat_ws function available starting 2017: Concat_ws is a new function introduced in sql server 2017. Syntax: CONCAT_WS ( separator, argument1, argument1 [, argumentN]… ) Concat_ws will take the separator as the first argument and will then concatenate variable number of argument into a single string. You will need a separator and minimum of