INSERT INTO locations(dhis_id, facility_name, location) SELECT DISTINCT dhis_id, facility_name, location FROM dhis_count WHERE dhis_id NOT IN(SELECT dhis_id FROM locations)
Created
June 2, 2019 14:57
-
-
Save paulobunga/27940dd8ee2fbf2e570aa65e6e565fbd to your computer and use it in GitHub Desktop.
MySQL Trigger to insert distinct values while checking existing in new table
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment