sql - How to display records from a table ordered as in the where clause? -


i trying display records,order in clause.. example:

select name table name in ('yaksha','arun','naveen'); 

it displays arun,naveen,yaksha (alphabetical order)
want display same order i.e 'yaksha''arun','naveen'
how display this... using oracle db.

add order by @ query's end:

order case name when 'yaksha' 1                    when 'arun'   2                    when 'naveen' 3          end 

(there's no other way order. need order specific result set order.)


Comments

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -