Click here to Skip to main content
15,881,092 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
HEllo Team,

I have table as follows:
Table Name : Qwner
ownername is one of the column.

OwnerName
Harshal
harshal
Tom
Sandip
Harshal

There are duplicate records in table . i want to avoid duplicate record .As i have try with distinct ,but no use..Please guide me..Do u have any other options.

Thanks
Harshal
Posted
Comments
[no name] 26-Mar-14 12:49pm    
DISTINCT is the way to do this. In what way was it "no use"?

Try:
SQL
SELECT DISTINCT OwnerName FROM Qwner

Works fine for me when I test it with your data...
 
Share this answer
 
Comments
Nirav Prabtani 26-Mar-14 12:52pm    
my 5+
DISTINCT, as mentioned by InsertCleverUserName[^] is what you want, unless you have a unique identifier.

SELECT DISTINCT OwnerName FROM Owner
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900