BUG: SQL Server Books Online Incorrectly States That SET ROWCOUNT is Applied Before ORDER BY (266332)



The information in this article applies to:

  • Microsoft SQL Server 7.0

This article was previously published under Q266332
BUG #: 58088 (SQLBUG_70)

SYMPTOMS

SQL Server Books Online states the following in the "Limiting Result Sets Using TOP and PERCENT" topic:

The SET ROWCOUNT limit applies to building the rows in the result set before an ORDER BY is evaluated. Even if ORDER BY is specified, the SELECT statement is terminated when n rows have been selected. n rows are selected, then ordered and returned to the client.

STATUS

Microsoft has confirmed this to be a problem in SQL Server 7.0.

REFERENCES

For another reference to this behavior, see the following article in the Microsoft Knowledge Base:

46168 INF: Effect of SET ROWCOUNT on SELECT with ORDER BY


Modification Type:MajorLast Reviewed:10/16/2002
Keywords:kbBug KB266332