Answer Posted / anand
TABLENAME: testanand
DATA:
id vanme emailid age
-- ------ ---------- ------
1 Anand anand.kv@abc.com 29
2 Anand anand.kv@abc.com 28
3 Rajesh rajesh@abc.com 30
4 Rajesh rajesh@abc.com 31
5 Vinit vinit@abc.com 21
6 Vinit vinit@abc.com 25
DELETE FROM testanand WHERE id Not IN
(SELECT min(id) FROM testanand GROUP BY vname)
RESULTS:
id vanme emailid age
-- ------ ---------- ------
1 Anand anand.kv@abc.com 29
3 Rajesh rajesh@abc.com 30
5 Vinit vinit@abc.com 21
| Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
Is sql server 2016 free?
How to create a simple user defined function in ms sql server?
Explain database normalization?
What is the use of floor function in sql server?
Explain external key management in sql server 2008
what is database replication? : Sql server database administration
What is named query? : sql server analysis services, ssas
What are click through reports?
How to test subquery results with the exists operator?
What is forward - only cursors / read only cursor?
What are the different types of cursor?
What will be the maximum number of indexes per table?
What is sql server 2000 work load governor?
What is the use of set nocount on/off statement?
What is efficiency data?