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


Please Help Members By Posting Answers For Below Questions

What triggers long term care?

547


What is built-in function?

536


What is the language structure to add a record to a table?

563


Write a sql query to sort on different column name according to the parameters passed in the function?

520


How can sql server instances be hidden?

518






What is scd (slowly changing dimension)? : sql server analysis services, ssas

582


What is the use of group by clause?

513


When would you use it?

568


What is identity?

534


What does the on delete cascade option do?

536


What is executereader?

541


How can we determine what objects a user-defined function depends upon?

510


How many types of triggers are there?

558


What are the different types of backups that exist?

670


What is openrowset sql server?

508