What does TOP 1 mean in an sql query?

前端 未结 6 1884
情书的邮戳
情书的邮戳 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:00

    I disagree with "The order will be defined based on the clustered key in that table."

    SQL Server Books Online is quite explicit: If the query has no ORDER BY clause, the order of the rows is arbitrary

    a repro demonstrating that this is not always the case: Without ORDER BY, there is no default sort order.

提交回复
热议问题