Created
August 9, 2011 23:47
-
-
Save morganick/1135516 to your computer and use it in GitHub Desktop.
Bulk Update rows.. there has to be a faster way
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE contacts SET primary_email_id = ( | |
SELECT id FROM contact_emails | |
WHERE contact_id = contacts.id AND is_primary = 1 | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment