Hi,
I want to run a query that will return the last five records from a table. I am a newbie to SQL and MySQL so what I have been trying so far has not worked:
SELECT table.col1, table.col2, table.col3
FROM table
WHERE rownum >= count(*)-5
Can anyone put me on the right track to get this working?
Thanks in advance,
Dan
I want to run a query that will return the last five records from a table. I am a newbie to SQL and MySQL so what I have been trying so far has not worked:
SELECT table.col1, table.col2, table.col3
FROM table
WHERE rownum >= count(*)-5
Can anyone put me on the right track to get this working?
Thanks in advance,
Dan