Created
January 3, 2012 18:14
-
-
Save gabrielgilini/1556143 to your computer and use it in GitHub Desktop.
Example of non-working code
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
| DELIMITER // | |
| CREATE PROCEDURE p1() | |
| BEGIN | |
| DECLARE ids INT; | |
| SELECT id FROM t4 WHERE t5_id = 8 INTO @ids; | |
| SELECT | |
| t3.* | |
| FROM | |
| t1 | |
| INNER JOIN t2 ON t2.t1_id = t1.id | |
| INNER JOIN t3 ON t3.id = t1.t3_id | |
| WHERE | |
| t2.t4_id IN (@ids); | |
| END; | |
| // | |
| DELIMITER ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment