Most of us must have experienced this problem at least once when you want to order some of your records in a specific way. Or your boss or client asks this weird request to see some specific records on top. And you are puzzelled, how to do this.
The following example shows how we can get this:
05 | SELECT FirstName, LastName |
10 | SELECT FirstName, LastName |
13 | WHEN 'Wright' THEN '0' |
14 | WHEN 'Jenkins' THEN '1' |
15 | WHEN 'Torres' THEN '2' |
16 | WHEN 'Sanchez' THEN '3' |
21 | SELECT FirstName, LastName |
24 | WHEN 'Wright' THEN '0' |
25 | WHEN 'Jenkins' THEN '1' |
26 | WHEN 'Torres' THEN '2' |
27 | WHEN 'Sanchez' THEN '3' |
No comments:
Post a Comment