Help for this page

Select Code to Download


  1. or download this
    DELETE FROM source dup
    WHERE EXISTS (
      SELECT NULL
    ...
      WHERE dup.field1=source.field1
        AND dup.field2=source.field2
        AND source.key<dup.key)
    
  2. or download this
    my $data=$dbh->prepare("SELECT key, field1, field2 FROM source ORDER B
    +Y field1, field2");
    my $del=$dbh->prepare("DELETE FROM source WHERE key=?");
    my @last;
    ...
    }
    $data->finish();
    $del->finish();