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

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -