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 / v.krishnakumar

using the keyword distinct we can avoid the duplicate value
in our table,(ex) SELECT DISTINCT empname FROM Employee

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which are the two editions in which SQL Azure database available?

119


How many types of dimensions are there and what are they? : sql server analysis services, ssas

1068


List the ways in which dynamic sql can be executed?

1014


What is user-defined inline table-valued function?

951


How many null values we can have in a unique key field in sql server?

958


What are the advantages of sql stored procedure?

1074


Why do we use functions?

913


How to select some specific columns from a table in a query in ms sql server?

1005


On a windows server 2003 active – passive failover cluster, how do you find the node which is active?

1206


What is the meaning of sql server?

986


Explain sql server service broker?

977


What is the difference between char and varchar2 datatype in sql?

1066


How can delete duplicate records in cte in sql server?

964


What is difference between createstatement and preparedstatement?

1090


How to test odbc dsn connection settings?

1034