web analytics

Tagged: duplicate

Removing Duplicates through SQL Query 1

Removing Duplicates through SQL Query

Reading Time: 1 minuteSuppose we have a table in SQL Server, that has duplicates in it. CREATE TABLE T1 ( ProductName varchar(50) ) INSERT INTO T1 VALUES (‘Computer’), (‘Computer’), (‘Printer’), (‘Printer’), (‘Printer’), (‘Scanner’), (‘Scanner’), (‘Scanner’), (‘Scanner’), (‘Camera’),...

Delete duplicate rows from table 1

Delete duplicate rows from table

Reading Time: 1 minuteIn the above line we are inserting all the distinct row of the "EmployeeTable" to another table "Emp_Temp_Table" (Emp_Temp_Table will create automatically when you use the above query.) Actuall the above query create clone...