Created
May 26, 2016 13:33
-
-
Save yoavmatchulsky/3ad243b3032e69347c687105bda4e651 to your computer and use it in GitHub Desktop.
This file contains 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
CREATE VIEW emails AS ( | |
SELECT email FROM users | |
UNION | |
SELECT other_email AS email FROM more_users | |
UNION | |
select other_other_email AS email FROM even_more_users | |
); | |
SELECT 1 FROM emails WHERE email = 'email@email.com'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment