I checked Information Center of different platforms.
Then I found that DB2 for z/OS and for iSeries suppot equal("=") or not equal("<>") of two (row-value-expression).
While DB2 for LUW doesn't.
The syntax include comparison of (row-value-expression) and (fullselect) in "Quantified predicate",
but not (row-value-expression) and (row-value-expression).
DB2 UDB for z/OS Version 8 > DB2 reference information > DB2 SQL > Language elements > Predicates
Basic predicate
Code:
>>-+-expression-+-=-------+-expression--------------------------+-><
| | (1) | |
| +-<>------+ |
| +-<-------+ |
| +->-------+ |
| +-<=------+ |
| '->=------' |
| (1) |
'-(row-value-expression)--+-=------+--(row-value-expression)-'
'-<>-----'
IBM i 7.1 Information Center > Database > Reference > SQL reference > Language elements > Predicates
--------------------------------------------------------------------------------
Basic predicate
A basic predicate compares two values or compares a set of values with another set of values.
Code:
>>-+-expression--+- = --+--expression---------------------------------+-><
| +- <> -+ |
| +- < --+ |
| +- > --+ |
| +- <= -+ |
| '- >= -' |
+-(--row-value-expression--)--+- = --+--(--row-value-expression--)-+
| '- <> -' |
+-(--fullselect--)--+- = --+--(--row-value-expression--)-----------+
| '- <> -' |
'-(--row-value-expression--)--+- = --+--(--fullselect--)-----------'
'- <> -'
DB2 Version 9.7 for Linux, UNIX, and Windows
--------------------------------------------------------------------------------
Basic predicate
Code:
>>-expression--+- = ------+----expression----------------------><
| (1) |
+- <> -----+
+- < ------+
+- > ------+
| (1) |
+- <= -----+
| (1) |
'- >= -----'
DB2 Version 9.7 for Linux, UNIX, and Windows
--------------------------------------------------------------------------------
Quantified predicate
Code:
>>-+-expression1--+- = ------+--+-SOME-+--(fullselect1)------+-><
| | (1) | +-ANY--+ |
| +- <> -----+ '-ALL--' |
| +- < ------+ |
| +- > ------+ |
| +- <= -----+ |
| '- >= -----' |
| .-,---------------. |
| V | |
'-(------expression2---+--)-- = --+-SOME-+--(fullselect2)-'
'-ANY--'