[sql] Copy rows from one table to another, ignoring duplicates