Skip to content

Instantly share code, notes, and snippets.

@matiit
Created December 7, 2012 10:02
Show Gist options
  • Save matiit/4232250 to your computer and use it in GitHub Desktop.
Save matiit/4232250 to your computer and use it in GitHub Desktop.
Updating table in different database
UPDATE
database1.table D1,
database2.table D2
SET D1.email=D2.email
WHERE D1.domain=D2.domain AND D1.email IS NULL AND D2.email <>'';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment