What does TOP 1 mean in an sql query?

前端 未结 6 1881
情书的邮戳
情书的邮戳 2021-01-14 03:37

What does TOP 1 mean in an sql query?

SELECT TOP 1 RequestId 
FROM PublisherRequests
6条回答
  •  醉梦人生
    2021-01-14 04:02

    It will select the first row from the PublisherRequests table.

    EDIT: [The order will be defined based on the clustered key in that table - This statement is incorrect]. Actually, according to Alex's findings, and according to BOL, the order of the rows will be arbitrary.

    Reference can be found here.

提交回复
热议问题