|
-
I got it. I used CASE to solve this problem.
select ename from emp where ename= CASE
WHEN 'james' THEN '1'
WHEN 'king' THEN '2'
WHEN 'allen' THEN '3'
WHEN 'clark' THEN '4'
END in('1','2','3','4') order by CASE ename
WHEN 'james' THEN '1'
WHEN 'king' THEN '2'
WHEN 'allen' THEN '3'
WHEN 'clark' THEN '4'
END
Thanks for all
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|