-- { echoOn } SELECT * FROM test1 LEFT JOIN test2 ON test1.col1 = test2.col1 WHERE test2.col1 IS NULL ORDER BY test2.col1 ; 12321 -30 \N \N SELECT * FROM test2 RIGHT JOIN test1 ON test2.col1 = test1.col1 WHERE test2.col1 IS NULL ORDER BY test2.col1 ; \N \N 12321 -30 SELECT * FROM test1 LEFT JOIN test2 ON test1.col1 = test2.col1 WHERE test2.col1 IS NOT NULL ORDER BY test2.col1 ; 123 123 123 5600 321 -32 321 5601 SELECT * FROM test2 RIGHT JOIN test1 ON test2.col1 = test1.col1 WHERE test2.col1 IS NOT NULL ORDER BY test2.col1 ; 123 5600 123 123 321 5601 321 -32 SELECT test2.col1, test1.* FROM test2 RIGHT JOIN test1 ON test2.col1 = test1.col1 WHERE test2.col1 IS NOT NULL ORDER BY test2.col1 ; 123 123 123 321 321 -32 SELECT test2.col3, test1.* FROM test2 RIGHT JOIN test1 ON test2.col1 = test1.col1 WHERE test2.col1 IS NOT NULL ORDER BY test2.col1 ; 5600 123 123 5601 321 -32 DROP TABLE IF EXISTS test1; DROP TABLE IF EXISTS test2;