oracle - simple query to generate the o/p with sql -
table contains
column1 b c d e
simple query display output as
column1 b e c d
i tried using
select * table order rowid;
iz der other exact way fetch desired result?
this should do:
select * table order case column1 when 'b' 1 when 'e' 2 when 'a' 3 when 'c' 4 when 'd' 5 end
here is sqlfiddle demo. , results are:
╔═════════╗ ║ column1 ║ ╠═════════╣ ║ b ║ ║ e ║ ║ ║ ║ c ║ ║ d ║ ╚═════════╝
Comments
Post a Comment