I have the following query working properly.
SELECT *
FROM (
SELECT *
FROM table
WHERE name IS NULL
ORDER BY date DESC
LIMIT 20
) AS T
ORDER BY date ASC;
What I would like is to select the top 5 records of that sql select query. So according to the posts I read I should only have to add TOP 5. See here below:
SELECT TOP 5 *
FROM (
SELECT *
FROM table
WHERE name IS NULL
ORDER BY date DESC
LIMIT 20
) AS T
ORDER BY date ASC;
Unfortunately mysql is telling me that there is a syntax error but I don’t get it. Thank you in advance for replies. Cheers. Marc
Just add another limit..