Home
|
Ask Question
|
Interview Questions
|
Tech FAQ
s
|
Engineering
|
Company
|
Geek Forums
|
Interview Coaching
|
Online Quiz
|
Interview eBook
Code Base
Submit Code
Back
Oracle
PHP
Java
ASP.NET
C#
Delphi
VB.NET
Perl
ColdFusion
SQL Server
MySQL
C
C++
UNIX
AJAX
Flash
HTML
CSS
Java Script
VB Script
XML
Python
MS Access
MainFrame
SQL Server Code Base
•
Change to Proper case Function
•
Delete Duplicate Records
Code Samples
SQL Server
Delete Duplicate Records
Code Resource
Author:
gupt_12
Difficulty Level
:
Published:
6th Nov 2006
Read:
5935 times
Filed in:
SQL Server
Add Comment
Sponsored Links
Removing Duplicate Records in Sql. Execute the below statements in sequence
Sample Code
SELECT
*
FROM
table1
SELECT
DISTINCT
*
INTO
table2
FROM
table1
DELETE
table1
INSERT
INTO
table1
SELECT
*
FROM
table2
SELECT
*
FROM
table1
DROP
TABLE
table2
Copyright GeekInterview.com
Next:
Change to Proper case Function
Latest Code Samples
♦
Change to Proper case Function
♦
Delete Duplicate Records
Popular Code Samples
♦
Change to Proper case Function
♦
Delete Duplicate Records
Related Code Samples
»
Generation of Duplicate Image
»
Delete Spaces from File
»
Customer List With Edit and Delete Options
Post Your Comment:
Members Please Login
Your Name:
*
e-mail ID:
(required for notification)
*
Image Verification:
Subscribe
Comments
In oracle we have rowid to uniquely identify every records. Do we have anything of that sort in DB2.
Because this would be a time consuming process if number of constraints/indexes defined on the table are more.
The code is good . but it is getting slow when we handle the large tables for duplicate deleting.
Popular Coders
#
Coder Name
Hits
1.
Jim.Anderson
6290
2.
gupt_12
5936
Active Coders
#
Coder Name
Codes
1.
gupt_12
1
2.
Jim.Anderson
1
Refined Tags
Copyright © 2012 GeekInterview.com | All Rights Reserved
Because this would be a time consuming process if number of constraints/indexes defined on the table are more.