Introduction

In this tutorial, we want to select a specific number of rows from a table by using a SQL Statement. In order to do this, we use the SELECT Statement with the LIMIT Clause.

We have already created the table student with the following data:

SQL Statement

We want to select the top 5 rows from the table student.

In order to do this, we execute the following SQL statement:

SELECT * FROM student
LIMIT 5;

Selected Data

The following selection is returned:

Conclusion

Congratulations! Now you are one step closer to become an AI Expert. You have seen that it is very easy to select a specific number of rows from a table. We can simply use the SELECT Statement with the LIMIT Clause. Try it yourself!

Instagram

Also check out our Instagram page. We appreciate your like or comment. Feel free to share this post with your friends.