[ROW_NUMBER function (Transact-SQL )]

Source: Internet
Author: User
[ROW_NUMBER function (Transact-SQL)] returns the serial number of an expert in the result Set Partition. The first row of each partition starts from 1. Note: ROW_NUMBER () OVER (PARTITIONBYCOL1ORDERBYCOL2) -- (here, COL1 and COL2 can be multiple columns) selectxt. id, xt. item, xt. attribute1, xt. attribute2, ROW_NUMBER (

[ROW_NUMBER function (Transact-SQL)] returns the serial number of an expert in the result Set Partition. The first row of each partition starts from 1. Note: ROW_NUMBER () OVER (partition by COL1 order by COL2) -- (where, COL1 and COL2 can be multiple columns) select xt. id, xt. item, xt. attribute1, xt. attribute2, ROW_NUMBER (

[ROW_NUMBER function (Transact-SQL)] returns the serial number of an expert in the result Set Partition. The first row of each partition starts from 1.

Note: ROW_NUMBER () OVER (partition by COL1 order by COL2) -- (where, COL1, and COL2 can be multiple columns)

Select xt. id, xt. item, xt. attribute1, xt. attribute2, ROW_NUMBER () OVER (partition by xt. id, xt. item order by xt. id, xt. item) test from xxuts_test xt

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.