SQL Избегайте дубликатов в вставке в Select
INSERT INTO OldCustomers(customer_id, age)
SELECT customer_id, age
FROM Customers
WHERE NOT EXISTS(
SELECT customer_id
FROM OldCustomers
WHERE OldCustomers.customer_id = Customers.customer_id
);
SAMER SAEID