Created
July 18, 2016 16:54
-
-
Save elenst/033b58246b1d1907c948c9b2e7db3495 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 TABLE t1 (i1 INT, i2 INT NOT NULL) ENGINE=MyISAM; | |
INSERT INTO t1 VALUES (1,4),(2,6); | |
SELECT * FROM t1 AS alias1 | |
WHERE alias1.i1 IN ( | |
SELECT i1 FROM t1 WHERE alias1.i2 IN ( SELECT i2 FROM t1 HAVING i2 <> 7 ) | |
); | |
DROP TABLE t1; | |
# Release build: | |
+------+----+ | |
| i1 | i2 | | |
+------+----+ | |
| 1 | 4 | | |
| 2 | 6 | | |
+------+----+ | |
2 rows in set (0.00 sec) | |
# Debug build: | |
Empty set (0.00 sec) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment