Computer >> Computer tutorials >  >> Programming >> MySQL

How to simulate the LIMIT MySQL clause with an Access database?


In Microsoft Access, you can use TOP instead of LIMIT. Let us first create a −

How to simulate the LIMIT MySQL clause with an Access database?

Insert some records in the table using insert command −

How to simulate the LIMIT MySQL clause with an Access database?

Following is the query to simulate the LIMIT MySQL clause with an Access database −

How to simulate the LIMIT MySQL clause with an Access database?

After clicking Run, you will get the desired output −

How to simulate the LIMIT MySQL clause with an Access database?

In MySQL, to get top 5 values, you need to use LIMIT 5 −