SQL SELECT distinct | SQL SELECT TOP, LIMIT, ROWNUM

The SQL SELECT distinct can be used to return the specified number of records, it is a very useful clause on a large table with thousands of record available in the table and all database systems support the SELECT TOP Clause.

SQL SELECT Distinct syntax

SQL SELECT TOP

ProductSale
Id
CustomerName
ProductPrice
Quantity
Result: Finally 5 Records
Therefore Below is a selection from the “product sales” table:

Id CustomerName ProductPrice Quantity
1 Abhishek 2500 70
22 Devendra 7500 30
12 Sonu 4500 90
32 Yahim 4100 80
172 Zamin 2900 110

SQL Server / MS Access Syntax

similarly, Equivalent in MySQL and Oracle

MySQL

Oracle Syntax

PERCENT Example

Resource
SQL