SQL - How can I SELECT from last to first

How can I Select and get from the end on the list
instade from the start?

You should probably ask the question in the appropriate forum (this is PHP, not SQL) and give more info about what you want and what you have at your disposal.

To cut it short, you don’t “select from the end”, you give the select criteria and order the result the way you want to see it (ascending / descending) based on a key. You probably need some condition to filter unwanted results too.
It’s easy to google it out with information I provided so I won’t post examples.

Hi,
Just type the following code in mysql

SELECT EMP_NAME FROM EMP_TABLE
WHERE EMP_NUMBER=1000
ORDER BY EMP_NAME DESC
FETCH FIRST n ROWS ONLY

In MySQL this is called LIMIT.

not only is the syntax wrong for mysql, raji, but that’s a very sloppy example

your WHERE clause identifies a single employee, so there won’t be more than one row to sort, much less take the first n rows of…