In this chapter you will learn:
About top statement
Syntax of top statement
Example of top statement
About top statement
In SQL server TOP statement is used to retrieve data on the basic of top number or percent. If you have some details in the table with payment then you can display top 5 or 10 from the record.
Syntax of top statement
1. SELECT top number|percent column_name from table_name
2. SELECT top value * from table_name
Example of top statement
select top 5 * from humanresources.employee
SUMMARY
In this chapter, you have learned about top statement so try to retrieve some records from the table with the top clause. In the next chapter you will learn about IN clause.