2
I’m having to create a query that returns the data ordered by a specific field, for example name, but the first return line should be the last id. You can do this with sql?
Let’s assume I have the user table:
id nome
1 João
2 Marcelo
3 André
4 Vanessa
The return must be:
id nome
4 Vanessa
3 André
1 João
2 Marcelo
If anyone has any ideas for that.
Follows a Sqlfiddle
@Marcelodiniz this is the explanation I put in my answer: http://social.technet.microsoft.com/wiki/contents/articles/4436.union-x-union-all-pt-br.aspx
– Maria