Tag: t-sql statements

Basics of Running T-SQL Statements from Command Line using SQLCMD

12:16 T-SQL, Tools & technologies, Utilities & Extensions

This article is about developing a basic understanding of sqlcmd utility to run T-SQL commands...
Read More

MERGE: Updating Source and Target Tables Located on Separate Servers

12:00 Database development, Statements, Tables

What is the MERGE statement? Using the MERGE statement, we can change data in a target table based on data in a source table. Using it, we...
Read More

Understanding PIVOT, UNPIVOT, and Reverse PIVOT Statements

17:06 Database development, Statements

The PIVOT statement is used to convert table rows into columns, while the UNPIVOT operator converts columns back to rows. Reversing a PIVOT...
Read More

Grouping Data using the OVER and PARTITION BY Functions

15:40 Database administation, Work with data • One Comment

The OVER and PARTITION BY functions are both functions used to portion a results set according to...
Read More

Methods to Rank Rows in SQL Server: ROW_NUMBER(), RANK(), DENSE_RANK() and NTILE()

14:25 Database development, Statements

SQL Server provides us with a number of window functions that help us to perform calculations across a set of rows, without the need to...
Read More