SQL SELECT TOP Statement
- The SELECT TOP statement returns a specified number of records.
- SELECT TOP is useful when working with very large datasets.
- Non SQL Server databases use keywords like LIMIT, OFFSET, and ROWNUM.
The SQL SELECT TOP syntax
The general syntax is:
- SELECT TOP n column-names FROM table-name
SQL SELECT TOP Example
- SELECT TOP 3 Id, ProductName, UnitPrice, Package FROM Product ORDER BY UnitPrice DESC
Id | ProductName | UnitPrice | Package |
---|---|---|---|
38 | subham Ball | 263.50 | 12 - 75 cl bottles |
29 | Chayan das | 123.79 | 50 bags x 30 sausgs. |
9 | Shantanu Biswas | 97.00 | 18 - 500 g pkgs. |
Comments
Post a Comment