
CREATE TABLE empty (i INTEGER);
CREATE TABLE one (i INTEGER);
INSERT INTO one VALUES (1);

SELECT 5  = ALL (1) FROM one;
SELECT 5 != ALL (1) FROM one;
SELECT 5  = ANY (1) FROM one;
SELECT 5 != ANY (1) FROM one;

SELECT 5  = ALL (1,null) FROM one;
SELECT 5 != ALL (1,null) FROM one;
SELECT 5  = ANY (1,null) FROM one;
SELECT 5 != ANY (1,null) FROM one;

SELECT 5  = ALL (5) FROM one;
SELECT 5 != ALL (5) FROM one;
SELECT 5  = ANY (5) FROM one;
SELECT 5 != ANY (5) FROM one;

SELECT 5  = ALL (5,null) FROM one;
SELECT 5 != ALL (5,null) FROM one;
SELECT 5  = ANY (5,null) FROM one;
SELECT 5 != ANY (5,null) FROM one;

SELECT 5  = ALL (1,5) FROM one;
SELECT 5 != ALL (1,5) FROM one;
SELECT 5  = ANY (1,5) FROM one;
SELECT 5 != ANY (1,5) FROM one;

SELECT 5  = ALL (1,5,null) FROM one;
SELECT 5 != ALL (1,5,null) FROM one;
SELECT 5  = ANY (1,5,null) FROM one;
SELECT 5 != ANY (1,5,null) FROM one;

SELECT 5  = ALL (SELECT * FROM empty) FROM one;
SELECT 5 != ALL (SELECT * FROM empty) FROM one;
SELECT 5  = ANY (SELECT * FROM empty) FROM one;
SELECT 5 != ANY (SELECT * FROM empty) FROM one;

SELECT 5  = ALL (null) FROM one;
SELECT 5 != ALL (null) FROM one;
SELECT 5  = ANY (null) FROM one;
SELECT 5 != ANY (null) FROM one;
