Top Keyword With Select Statement In SQL
In this artcle i will explain how to use the top keyword in a select query to get the top element from the table.
The TOP clause allows us to specify how many rows to return. It is very useful on large tables with thousands of records. So we can use it in a select query to get the top element from the query.
SELECT TOP number|percent column_name(s)
Firstly, create a table named Employee having columns (ID, F_Name, L_Name, Salary, Region and City) and insert some values.
Employee Table data
To select Top 10 records from table