Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (55.6k points)

Can anyone explain how to select first 10 rows in SQL?

2 Answers

0 votes
by (119k points)

In SQL Server, we can use the TOP keyword to return the first 10 rows of the table. Here is an example to return the first 10 rows:

SELECT TOP 10 *

FROM table_name;

In MySQL, we can use the LIMIT keyword to return the first 10 rows of the table:

SELECT * FROM Table_Name
LIMIT 10;

I recommend this SQL training course by Intellipaat to become an expert in SQL.

0 votes
by (1.5k points)

Select top 10 * from tablename

Here use select to retrieve data and using top 10 to get the first 10 rows from the table.

Related questions

0 votes
2 answers
asked Jul 22, 2019 in SQL by Tech4ever (20.3k points)
0 votes
3 answers
0 votes
1 answer
0 votes
2 answers

1.2k questions

2.7k answers

501 comments

693 users

Browse Categories

...