0
How do I sort the results of a query as a sequence displayed in the In clause? That is, the order of the lines must respect the same order of values indicated in this clause.
Example:
sql = select var_valor from tabela where var_codigo in (4,2,7);
In this case, the result should first display the var_value of code 4, after code 2 and last code 7.
Below is the code in SQL Fiddle to illustrate my question: http://sqlfiddle.com/#! 9/4c663e/10
Thank you Murilo!!!
– Luis