December 2010
Intermediate to advanced
451 pages
11h 16m
English
You have found that for some reason your database contains a table that has duplicate records. You are working with a database that unfortunately does not use primary key values, so you must manually enforce data integrity. You need a way to remove the duplicate records. However, any query you write to remove one record will also remove its duplicate.
The solution to this issue involves two steps. First you need to query the database to find all duplicate rows, and then you need to run a statement to delete one of each duplicate record that is found.
The following code block queries the EMPLOYEES table for duplicate rows. When a duplicate is found, it is returned along with a count ...
Read now
Unlock full access