D
Dave Cullen
I need to copy records from one table to another, and overwrite (update) the
target table data if the record already exists.
INSERT INTO destination SELECT * FROM source WHERE <condition> works if the
records don't already exist in the destination table, but fails if they
exist.
UPDATE fails if the records don't already exist. Plus it requires tediously
typing all the column names and data.
Is there any SQL statement that'd work in both cases?
Thanks
target table data if the record already exists.
INSERT INTO destination SELECT * FROM source WHERE <condition> works if the
records don't already exist in the destination table, but fails if they
exist.
UPDATE fails if the records don't already exist. Plus it requires tediously
typing all the column names and data.
Is there any SQL statement that'd work in both cases?
Thanks