I have a table containing 300 million rows and a clustered index in the [DataDate] column.
How to select the last 10 rows of this table (I want to find the latest date in the table)?
Database: Microsoft SQL Server 2008 R2.
Update
The answers below work fine - but only if there is a clustered index in [DataDate]. In the end, the table is 300 million rows, and a naive query will take several hours, not seconds. The query plan uses the cluster index in [DataDate] to retrieve results within a few tens of milliseconds.
source share