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
What is relationship? What number of sorts of relationship are there?
Define tempdb database?
What is 4nf in normalization form?
Explain what are sparse columns?
How to delete multiple rows with one delete statement in ms sql server?
which backup strategy you are following at ur company
Explain encryption of entire databases without the need for application changes in sql server 2008?
What do you mean by data manipulation language?
What are constraints?
How do you create a data source?
Do you know hot add cpu in sql server 2008?
Can a table be moved to different filegroup?
How will you monitor replication latency in transactional replication? : sql server replication
What is the stuff?
Can another user execute your local temporary stored procedures?