Is it possible to delete duplicate rows in a table without
using a temporary table ?
Answer Posted / ambuj tayal
Yes, it is possible by using in memory table variables on
SQL server 2000 and above.
A table variable can be created and all disticnt values can
be inserted into this table and then deleting all rows from
first table you can insert back disticnt rows to back to
original table. Table variable would automatically be
destroyed whenever bacth execution finishes.
| Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
What is clustered vs nonclustered index?
Explain Capacity planning to create a database? and how to monitor it?
Explain cdc and sql injection?
How to replace given values with null using nullif()?
Define full outer join in sql server joins?
Explain the various types of concurrency problem?
Is it possible to call a stored procedure within a stored procedure?
what is database replicaion? : Sql server database administration
Some queries related to SQL
Which table keeps the locking information?
What do you mean by recursive stored procedure?
I applied Transactional with updatable subscriptions replication on 2 tables now i want to delete those 2 tables but i cannot delete those tables as replication is running how can i stop replication for those 2 tables(but i don't want to delete those replicated tables but i need to stop the replication) how can i do that
What happens when converting big values to integers?
Tell me what are cursors and when they are useful?
How use inner join in sql server?