Pagination in MS SQL Server

What Is Pagination?

Pagination is the process of dividing large data into smaller data sets in discrete pages. It is widely used in web applications.

How Does Pagination Work in MS SQL Server?

In MS SQL Server, we can achieve the pagination functionality by using OFFSET and FETCH clauses with ORDER BY in a SELECT statement.

Deleting Lost Transactions in MS SQL Server

Introduction

Quite often, transactions in MS SQL Server are lost by those who launched them. It is not infrequent that one runs a script in SSMS, which starts an explicit transaction with the BEGIN TRANSACTION statement, but then an error occurs and COMMIT TRANSACTION or ROLLBACK TRANSACTION fails while the transaction initiator has left this query for some time. Transactions left forgotten for long periods of time can prevent users from accessing the locked resources (tables, server resources (RAM, CPU, I / O system).

In this article, we will consider how to delete lost transactions using SQL Complete.

14 Differences Between Standard SQL and Transact-SQL

In my last article, I roughly described how standard SQL differs from T-SQL and who should learn which. Now I’d like to focus on the syntax differences and illustrate these differences with examples. If you think T-SQL is an extension implementing all the features from standard SQL, you aren’t right. However, in SQL Server, you will find almost all the features of the SQL standard. In this article, you will find examples of some of the differences in syntax between standard SQL and Transact-SQL.

#1 Names of Database Objects

In relational database systems, we name tables, views, and columns, but sometimes we need to use the same name as a keyword or use special characters. In standard SQL, you can place this kind of name in quotation marks (""), but in T-SQL, you can also place it in brackets ([]). Look at these examples for the name of a table in T-SQL: