This is allowed:
SELECT * FROM emp WHERE (dept, sal) = ((1, 100));
And in another idea I am proposing to allow row values on the right-hand side instead of a data set:
SELECT * FROM emp WHERE (dept, sal) = (1, 100);
What is not supported is this:
SELECT * FROM emp WHERE (dept, sal) < ((1, 100));
resp.
SELECT * FROM emp WHERE (dept, sal) < (1, 100);
The same applies to <= , >, and >= of course.
The SQL standard allows this and it is very useful when using pagination. So far we must use this to get the next 50 rows:
SELECT *
FROM programs
WHERE version > :version
OR (version = :version AND subversion > :subversion)
OR (version = :version AND subversion = :subversion AND subsubversion > :subsubversion)
ORDER BY version, subversion, subsubversion
FETCH NEXT 50 ROWS ONLY;
While in standard SQL we would just use:
SELECT *
FROM programs
WHERE (version, subversion, subsubversion) > (:version, :subversion, :subsubversion)
ORDER BY version, subversion, subsubversion
FETCH NEXT 50 ROWS ONLY;
(And in conclusion it should be possible then to use the comparision operators on data sets, too: WHERE (version, subversion) >= all (select version, subversion from ...).)