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
What is standby servers? Explain types of standby servers.
What are wait types?
What is clustered index
Explain system functions or built-in functions? What are different types of system functions?
What is an indexed view?
How can I check that whether automatic statistic update is enabled or not?
List out the different types of locks available in sql server?
Is it possible to have clustered index on separate drive from original table location?
What is sql or structured query language?
what is spatial nonclustered index
How to convert character strings into numeric values?
What is in place upgrade in sql server?
What is a coalesce function?
How to connect php with different port numbers?
Can sql servers link to other servers like oracle?