More on Sql Server 2012( code named Denali)–query and TSQL


Sequence Object :  User created objects for generating sequence numbers with specified increments

/* Creating Sequence */
CREATE Sequence MySequence
Start WITH 1
Increment BY 1;

 

/*Usage*/

INSERT MyTable (ID, Name)
VALUES (NEXT VALUE FOR MySequence, ‘asdf’),
(NEXT VALUE FOR MySequence, ‘qwer’)

Extended full text index : Full text index has been extended , which will allow us to search and index from data stored in metadata and extended properties. Properties like file type, created date etc of an external files can be brought into the index.

Query Paging : This is a long waiting feature from SQL server . This is accomplished by extending the ORDER BY statement.

 

SELECT SaleOrderID, ItemCode, Qty
FROM SalesOrder
ORDER BY SalesOrderID
OFFSET 100 ROWS
FETCH NEXT 100 ROWS ONLY;

Offset will give an indication about how many rows it has to take at first and the FETCH part will tell about how much records it has to return each time.

Advertisements

Comment please...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s