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 / navneet sharma
select distinct * from tablename
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
What is sql or structured query language?
What is sql server query analyzer?
What are the different types of subquery?
what is spatial nonclustered index
List the ways in which dynamic sql can be executed?
How can you append an identity column to a temporary table?
If you're given a raw data table, how would perform etl (extract, transform, load) with sql to obtain the data in a desired format?
You have a stored procedure, which execute a lengthy batch job. This stored procedure is called from a trigger you do not want to slow the data entry process you do not want trigger to wait for this batch job to finish before it completes itself what you can do to speed up the process?
What are different types of constraints?
How to provide default values to function parameters?
What are the risks of storing a hibernate-managed object in a cache? How do you overcome the problems?
Can we shrink data file in sql server?
How to enter binary string literals in ms sql server?
Can sql servers link to other servers like oracle?
explain different types of backups avaialabe in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration