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...

Delete duplicate rows from a table without primary key by
using a single query
Table Employee
empname salary
A 200
B 300
A 200
C 400
D 500
D 500

Output should be

A 200
B 300
C 400
D 500

Answer Posted / jansi rani

SELECT EMPNAME,SAL FROM EMP GROUP BY EMPNAME,SAL

Is This Answer Correct ?    0 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How column data types are determined in a view?

901


What is subquery? Explain the properties of a subquery?

927


How to create a new table in a given schema?

1114


Define magic tables in sql server?

993


What is sql server database?

939


What does select 1 mean?

886


What is the recommended total size of your memory optimized tables?

912


what are the types of indexes? : Sql server database administration

1062


What are subquery and its properties?

983


can you instantiate a com object by using t-sql? : Sql server database administration

963


How do I open a .db file?

974


What is temporary table in sql server? Why we use temp table?

908


What is a primary index?

885


What is the new security features added in sql server 2016? : sql server security

1057


How will you find out if there are expensive SQL statements running or not?

969