I'm having to create a query that returns the data sorted by a specific field, for example name, but the first return line must be the last id. Can you do this with sql?
Let's suppose I have the user table:
id nome
1 João
2 Marcelo
3 André
4 Vanessa
The return should be:
id nome
4 Vanessa
3 André
1 João
2 Marcelo
If anyone has any ideas for this.
Follow a SQLFiddle