adspace


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

What is standby servers? Explain types of standby servers.

1081


What are wait types?

1250


What is clustered index

1087


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

1067


What is an indexed view?

1023


How can I check that whether automatic statistic update is enabled or not?

1113


List out the different types of locks available in sql server?

1051


Is it possible to have clustered index on separate drive from original table location?

1041


What is sql or structured query language?

1228


what is spatial nonclustered index

1060


How to convert character strings into numeric values?

1192


What is in place upgrade in sql server?

1127


What is a coalesce function?

1285


How to connect php with different port numbers?

1191


Can sql servers link to other servers like oracle?

919