about 5 years ago
Hello Reader's if you want to use top in your MySql query then this blog is very helfull to you.
Lets see how to use top clause in MySql in different different location.
Suppose if you want to get only first 5 records of the table, Then you can use top clause in this way:-
SELECT TOP 5 * FROM MyStudent;
Output of this will give you first 5 records from MyStudent table.
Now let's talk about big and bigger database, having records of hundreds of thousands entries. In this situation you can use % records filtration by using top clause. And it's code will go like this:-
SELECT TOP 5 PERCENT * FROM MyStudent;
In this case above case your selection will process on only top 5% records of the whole table. And you will only get top 5% amount of the records from the table.
So by these two different way you can use top clause according to your need. It's fast and new feature of Mysql.
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Terms of Service
| © copyright 2021 FindNerd.com. All rights reserved.
Sign up using