Lets say I have table as below.
create table t1 (id INT, tempData varchar(25));
and data as
insert into t1 values
(01, 'value 01'),
(02, 'value 02'),
(03, 'value 03'),
(04, 'value 04'),
(05, 'value 05'),
(06, 'value 06'),
(07, 'value 07'),
(08, 'value 08'),
(09, 'value 09'),
(10, 'value 10'),
(11, 'value 11'),
(12, 'value 12');
Now what I want is create a query to get data in below format
+++++++++++++++++
Id + tempData
+++++++++++++++++
03 + value 03
09 + value 09
01 + value 01
// now random order except above three ids
04 + value 04
06 + value 06
.
.
.
+++++++++++++++++
I want first row as 03, then 09, then 01 and then any random order.
Any suggestion on how to get this done?
Edit 1
I have huge database and the for ordering I have around 1200 ids. So I can't write those manually. Is there any other way where I can say number as 3,9,1
?