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


Please Help Members By Posting Answers For Below Questions

You are designing a strategy for synchronizing an SQL Azure database and multiple remote Microsoft SQL Server 2008 databases. The SQL Azure database contains many tables that have circular foreign key relationships?

99


What stored by the model?

548


How many types of attribute relationships are there? : sql server analysis services, ssas

582


What is Command line parameters in PLSQL.?

580


Do you know what is xpath?

557






Is it possible to import data directly from t-sql commands without using sql server integration services? If so, what are the commands?

853


how many triggers you can have on a table? : Sql server database administration

494


What is pivot and unpivot?

639


Explain sql server service broker?

510


Define Unique Key?

592


How adventureworkslt tables are related?

528


What is a view in sql?

578


What are the differences between char and varchar in ms sql server?

574


Explain temporary table vs table variable by using cursor alternative?

517


What does asynchronous call backs means?

621