Skip to content

Instantly share code, notes, and snippets.

@BenjaminLu
Created January 20, 2016 11:45
Show Gist options
  • Save BenjaminLu/3a689d0adfacc2f9a203 to your computer and use it in GitHub Desktop.
Save BenjaminLu/3a689d0adfacc2f9a203 to your computer and use it in GitHub Desktop.
INSERT INTO `copy_db_broker`.`order` (
SELECT *
FROM `original_db`.`order`
WHERE `original_db`.`order`.`broker_name` = `customer_broker_name`
AND `original_db`.`order`.`id` NOT IN (
SELECT `id`
FROM `copy_db_broker`.`order`
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment