How to Suppress the “N Row(s) Affected” Output Message in SQL Server

Sometimes, when working with T-SQL scripts, you might want to skip the message “(N row(s) affected)” message. This article explains how to suppress the “N Row(s) Affected” output message in SQL Server.   Explanation You get this message when you execute T-SQL statements or stored procedures that they affect rows. To this end, SQL Server … Read more…

The STRING_SPLIT Function in SQL Server

A long-awaited string function added to SQL Server 2016 (and later) the is STRING_SPLIT function. Read on to better understand this cool function and see examples of how you can use it.   What does the STRING_SPLIT Function in SQL Server do? As the name implies: this function splits the given character expression using the separator … Read more…

Built-In JSON Support in SQL Server and Azure SQL Database

JSON stands for JavaScript Object Notation and it is widely used for data representation in the data services world. With built-In JSON support in SQL Server and Azure SQL Database, you can format query results as JSON by adding the “FOR JSON” clause to a SELECT statement in SQL Server and Azure SQL Database. Also, … Read more…

Listing all Tables of a Linked SQL Server Database

Introduction There are many scenarios in the DBMSs world where you might need to use a linked server between two different SQL Server instances in order to execute direct queries between them. However, the majority of T-SQL auto-complete tools have difficulties to list the objects (i.e. tables) of the linked server’s database.   Custom Stored Procedure … Read more…

How to Import and Export Unstructured Data in SQL Server – FILESTREAM

A few weeks ago I posted an article on how to import and export unstructured data in SQL Server 2005 by using the “image” data type. In this article I will show how you can manipulate unstructured data in SQL Server 2008 or later by using the FILESTREAM feature. FILESTREAM allows storing unstructured data (i.e. … Read more…

How to Import and Export Unstructured Data in SQL Server – The IMAGE Datatype

Importing and exporting unstructured data from a database is a common practice, especially in large applications. SQL Server 2008 introduced the FILESTREAM feature that allows storing unstructured data (i.e. music, video, documents, etc.) onto the NTFS file system and manipulating it via the Database Engine. SQL Server 2012 introduced FileTables which is an enhancement to FILESTREAM. With … Read more…

Where are Programmability Objects Stored in SQL Server?

SQL Server programmability objects such as stored procedures, functions, assemblies, etc. are widely used, especially in cases of a major database design where you want to have a well-structured database with code reuse and performance.   The need to know where are Programmability Objects Stored in SQL Server Even though many of us use these … Read more…