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

What is indexing explain it with an example?

1016


Disadvantages of the indexes?

1128


What does it mean to manipulate data?

1003


What is raid? : SQL Server Architecture

1184


Explain the types of indexes.

1225


What are distributed partitioned views?

1083


What is database replication?

1152


What is model database? : SQL Server Architecture

1137


What is the syntax to execute the sys.dm_db_missing_index_details?

1030


what is database replication? : Sql server database administration

1074


is there a column to which a default can't be bound? : Sql server database administration

1019


How do I open port 1433?

937


What are the basic functions for master, msdb, model, tempdb and resource databases? : SQL Server Architecture

1009


What is right outer join in sql server joins?

1186


Can a function call a stored procedure in sql server?

966