I have a table EMP in which the values will be like this

EmpId Ename Sal DeptId
11 Ram 10000 10
11 Ram 10000 10
22 Raj 20000 20
22 Raj 20000 20
33 Anil 15000 30
33 Anil 15000 30

I want to delete only duplicate Rows. After Delete I want
the output like this

EmpId Ename Sal DeptId
11 Ram 10000 10
22 Raj 20000 20
33 Anil 15000 30



Answer Posted / samadhan

use distinct keywor in sql query

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is bit datatype? : Sql server database administration

651


Create a dts package to produce a text file using the ‘update statistics’ command for the tables in a database with obsolete statistics.

703


what is the sql equivaent of the dataset relation object ?

1724


How to enable/disable indexes?

769


How to restore performance issues and how to check?

1708






What happens if an integer is too big for int date type?

740


What do you mean by 'normalization'?

784


Name the different type of indexes in sql?

714


What are different replication agents and what's their purpose? : sql server replication

743


Write a program using SQL queries to find a unique entry in a table.

714


What are the differences between ms sql server & oracle?

740


What is the bookmark lookup and rid lookup?

751


Why I am getting "the microsoft .net framework 2.0 in not installed" message?

706


Can we join two tables without primary key?

799


What samples and sample databases are provided by microsoft?

759