SQL TOP Condition is use for return number of record return from table
SQL TOP is useful if large number of records store in your table. TOP condition is useful in performance
SELECT TOP Syntax
SELECT TOP No or Percent ColumnName FROM YourTableName WHERE Condition
Example
1. SELECT TOP 10 * FROM City
- Return 10 records from city table
2. SELECT TOP 10 PERCENT * FROM City
- Return TOP 10 percent record from city table
SQL TOP is useful if large number of records store in your table. TOP condition is useful in performance
SELECT TOP Syntax
SELECT TOP No or Percent ColumnName FROM YourTableName WHERE Condition
Example
1. SELECT TOP 10 * FROM City
- Return 10 records from city table
2. SELECT TOP 10 PERCENT * FROM City
- Return TOP 10 percent record from city table