I have a country table with country_name column.

General
Enthusiast

I have a country table with country_name column.

Hi Everyone,

Eg:   country_name

         India

         Australia

         srilanka

         America

         London

In this , but i need India as First,remaining countries will be based on desc order,how can we achieve this?

Regards,

Purushotham

2 REPLIES
Senior Apprentice

Re: I have a country table with country_name column.

Hi Purushotham,

you need a CASE:

order by
case when country_name = 'India' then 0 else 1 end,
country_name desc
Enthusiast

Re: I have a country table with country_name column.

Hi dnoeth,

I got the result,thank you..

I noticed in the forums,whatever scenaries people are asking,you are giving perfect answers especially SQL logic and teradata concepts.

Really I appreciate a lot,once again thank u so much dnoeth.

Thanks,
Purushotham.