Interesting Query

0

see Hi Guys! Today one of trainee in my team asked me one strange question, he shows a table and data –

valutahandel synonym querysql

click here Then he asked me to get first 7th id row then 15th id row then 10th id row after this other rows-

http://uaeauditors.net/?kripar=%D8%B7%D8%B1%D9%82-%D8%B3%D8%B1%D9%8A%D8%B9%D8%A9-%D9%84%D9%83%D8%B3%D8%A8-%D8%A7%D9%84%D9%85%D8%A7%D9%84-%D8%B9%D9%84%D9%89-%D8%A7%D9%84%D8%A7%D9%86%D8%AA%D8%B1%D9%86%D8%AA&0ee=06 I tried few queries, Hope this will help you too-

cosa e un opzione binaria Solution1 :

see url select * from sales where id=7
union all
select * from sales where id=15 –and id not in (7)
union all
select * from sales where id=10 –and id not in (7,15)
union all
select * from sales where id not in (7,10,15)

opcje binarne z najmniejszym depozytem querysql1

source url http://zspskorcz.pl/pictose/eseit/551 Solution2:

enter Select * from sales
Order by Case when id=7 then 1 when id=15 then 2 when id=10 then 3 else 4 End

follow querysql2

I am Microsoft Certified Professional for querying & Administering Sql Server. I believe “The greatest barrier to success is the fear of failure.”
I am also available at http://dbavimal.blogspot.com

%d bloggers like this: