Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

i have a table student like
sname
-----
ram
ram
ram
raj
raj
raj
i need the output like
sname
-----
ram
raj
ram
raj
ram
raj

Answer Posted / bobby

select ename from (select Row_Number() over (partition by
ename
order by ename) as ROWNO,ename from emp) p
order by ROWNO,ename desc

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what is it unwise to create wide clustered index keys?

965


What are temporal tables in sql server 2016?

868


What are the different subsets of sql?

1525


What is lock escalation and what is its purpose?

962


What is the use of @@spid?

980


What is the importance of three tier architecture?

1070


What are ddl triggers and types of ddl trigger?

1013


What is the command dbcc checkdb used for?

992


What is sql server programming?

1020


What are the events recorded in a transaction log?

980


Explain system functions or built-in functions? What are different types of system functions?

953


How to create a new schema in a database?

1109


what is the maximum size of a row? : Sql server database administration

990


What is the use of custom fields in report?

982


Is there any performance difference between if exists (select null from table) and if exists (select 1 from table)?

944