Created
January 27, 2013 20:19
-
-
Save rossmartin/4650226 to your computer and use it in GitHub Desktop.
Web SQL UNION with multiple LIMITs
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
SELECT * FROM ( | |
SELECT 'lab' AS table_name, id FROM table1 | |
WHERE organizerClassId = '4013-5' LIMIT 1) | |
UNION | |
SELECT * FROM ( | |
SELECT 'rad' AS table_name, id FROM table2 | |
WHERE organizerClassId = '4013-5' LIMIT 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment