Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
shanmugaraj
Posting Yak Master
219 Posts |
Posted - 2013-01-01 : 02:45:14
|
I have Country Table with all the countries.i want to select country "India" in first row then following by all the countries order by ascendingkindly help me on the query below to make the same..Select Country_Name form TblCountry order by Country_Name AscTHANKSSHANMUGARAJnshanmugaraj@gmail.com |
|
shenulal
Starting Member
11 Posts |
Posted - 2013-01-01 : 06:23:01
|
select 'India' as CountryunionSelect CountryName as Contry from Country |
|
|
shenulal
Starting Member
11 Posts |
Posted - 2013-01-01 : 06:23:37
|
select 'India' as CountryunionSelect CountryName as Contry from Country |
|
|
lionofdezert
Aged Yak Warrior
885 Posts |
Posted - 2013-01-01 : 09:55:55
|
Select Country_Name FROM TblCountry order by CASE WHEN Country_Name='India' THEN 1 ELSE 0 END DESC, Country_Name Asc--------------------------http://connectsql.blogspot.com/ |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-01-03 : 01:14:16
|
quote: Originally posted by shenulal select 'India' as CountryunionSelect CountryName as Contry from Country
this will not still guarantee order starting with India------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|