300x250 AD TOP

Powered by Blogger.

Home Page

Contributors

Blogger news

Tagged under:

Paging in SQL Server 2014

Paging in SQL Server 2014
  Designing Query paging in SQL Server 2014   Recently, I have been working on SQL Server paging and realized that the latest way of paging query of SQL Server 2014 has great performance when compared to the classical or custom query that we use for paging.   In this article I am depicting both the old way of SQL Paging and how query paging works in SQL Server 2014 and difference between both.   Before we start with SQL Query on Paging lets create a sample demo table which insert 10K rows...
Tagged under:

ALTER TABLE in SQL Server

ALTER TABLE in SQL Server
The below SQL Tutorial explains all the basic syntactical ALTER statements that we can perform in SQL like Add Column, Alter Column, Rename Column, Drop Column etc..DescriptionThe SQL ALTER TABLE statement is used to add, modify, or drop/delete columns in a table. The SQL ALTER TABLE statement is also used to rename a table. Adding a columnALTER TABLE table_name ADD column_name column-definition; Ex:The following statement will add a column "EMPName" in the Employee table which has a size of 50 characters.ALTER TABLE Employee ADD EMPName VARCHAR(50)GOAdding a column with default value:The following example...
Tagged under:

Deleting duplicates in SQL Server table

Deleting duplicates in SQL Server table
Delete duplicate rows in SQL Table: There are many situations where we need to delete duplicate rows in SQL tables. Infact, there are many ways to do it but one of the finest and simplest way is below. I am providing the below example using temp tables. Replace the temp table with the tablename where you want to delete duplicate rows. In the below example I am using ROW_NUMBER() and Partition By keywords. The beauty of the below process is this will remove duplicate with a single query. If Exists(Select * From tempdb.Information_Schema.Tables...
Pages (4)1234 »