patternsqlMinor
TOP X of SQL Server in MySQL Analog
Viewed 0 times
topsqlmysqlserveranalog
Problem
I am looking for SQL Server TOP (X) Analog in MySQL
In SQL Server:
How can this be done in MySQL?
ADDED:
I have found for other RDBMS: Returning TOP N Records
In SQL Server:
SELECT
TOP 5
Z
...
FROM
ORDER BY Z DESCHow can this be done in MySQL?
ADDED:
I have found for other RDBMS: Returning TOP N Records
Solution
SELECT
...
FROM
ORDER BY
LIMIT 5 [OFFSET 10] --Use offset for paging.Reference: http://dev.mysql.com/doc/refman/5.1/en/select.html
Code Snippets
SELECT
...
FROM
ORDER BY
LIMIT 5 [OFFSET 10] --Use offset for paging.Context
StackExchange Database Administrators Q#1115, answer score: 5
Revisions (0)
No revisions yet.