subquery no result
Created by: avelner
$ cat test2.txt
echo MySQL
mysql -uroot -p test << EOF
DROP TABLE IF EXISTS test;
CREATE TABLE test (a int not null, b int not null);
INSERT INTO test (a, b) VALUES (0, 4);
INSERT INTO test (a, b) VALUES (1, 5);
SELECT DISTINCT a FROM test WHERE a NOT IN (SELECT a FROM test WHERE b = 9)
EOF
echo
echo QL
rm -f test.db
ql -fld -db test.db << EOF
DROP TABLE IF EXISTS test;
CREATE TABLE test (a int not null, b int not null);
INSERT INTO test (a, b) VALUES (0, 4);
INSERT INTO test (a, b) VALUES (1, 5);
SELECT DISTINCT a FROM test WHERE a NOT IN (SELECT a FROM test WHERE b = 9)
EOF
$ bash test2.txt
MySQL
Enter password:
a
0
1
QL
"a"
Problem no result from QL