Tagged: query

SQL 0

How do I escape a single quote in SQL Server

A single quote can be escaped by doubling them up in MSSQL server. There are many ways to escape a single quote in SQL server. Let us look at the below examples to find...

SQL 0

How to find nth highest salary using SQL query

This is a common SQL question which will be asked in most of the interviews and also if you are working related to the financial application then most of them would have come across...

SQL 0

How to Format Query Results as JSON in MSSQL

One of the top features of MSSQL server 2016 is built in support of JSON. Yes, now we can format query results as JSON in MSSQL 2016 version onwards. The data from the MSSQL...

SQL 0

How to add root node to JSON output in MSSQL?

MSSQL 2016 has a new feature where you can return the data as JSON output format and also add root node to JSON output in MSSQL. Checkout MSSQL Built-In JSON support for more details....