DB2SQL92> CREATE TABLE testtab ( label VARCHAR(30) NOT NULL PRIMARY KEY, a VARCHAR(10), b VARCHAR(10) );DB2SQL92> DB2SQL92> DB2SQL92> DB2SQL92> Statement # 16 : CREATE TABLE testtab ( label VARCHAR(30) NOT NULL PRIMARY KEY, a VARCHAR(10), b VARCHAR(10) ) Elapsed Time is: 0.020 seconds --------------------------------------------- DB2SQL92> INSERT INTO testtab VALUES('both null',NULL,NULL); Statement # 17 : INSERT INTO testtab VALUES('both null',NULL,NULL) Elapsed Time is: 0.005 seconds --------------------------------------------- DB2SQL92> INSERT INTO testtab VALUES('a null',NULL,'b not null'); Statement # 18 : INSERT INTO testtab VALUES('a null',NULL,'b not null') Elapsed Time is: 0.004 seconds --------------------------------------------- DB2SQL92> INSERT INTO testtab VALUES('b empty string','a',''); Statement # 19 : INSERT INTO testtab VALUES('b empty string','a','') Elapsed Time is: 0.004 seconds --------------------------------------------- DB2SQL92> INSERT INTO testtab VALUES('a null, b empty string',NULL,''); Statement # 20 : INSERT INTO testtab VALUES('a null, b empty string',NULL,'') Elapsed Time is: 0.004 seconds --------------------------------------------- DB2SQL92> INSERT INTO testtab VALUES('equal non-empty strings','x','x'); Statement # 21 : INSERT INTO testtab VALUES('equal non-empty strings','x','x') Elapsed Time is: 0.004 seconds --------------------------------------------- DB2SQL92> INSERT INTO testtab VALUES('non-equal non-empty strings','x','y'); Statement # 22 : INSERT INTO testtab VALUES('non-equal non-empty strings','x','y') Elapsed Time is: 0.005 seconds --------------------------------------------- DB2SQL92> SELECT * FROM testtab; Statement # 23 : SELECT * FROM testtab LABEL A B -------------------------------------------------------- both null - - a null - b not null b empty string a a null, b empty string - equal non-empty strings x x non-equal non-empty strings x y Number of rows retrieved is: 6 Number of rows sent to output is: 6 Elapsed Time is: 0.005 seconds --------------------------------------------- DB2SQL92> SELECT * FROM testtab WHERE a=b; Statement # 24 : SELECT * FROM testtab WHERE a=b LABEL A B -------------------------------------------------------- equal non-empty strings x x Number of rows retrieved is: 1 Number of rows sent to output is: 1 Elapsed Time is: 0.004 seconds --------------------------------------------- DB2SQL92> SELECT * FROM testtab WHERE a<>b; Statement # 25 : SELECT * FROM testtab WHERE a<>b LABEL A B -------------------------------------------------------- b empty string a non-equal non-empty strings x y Number of rows retrieved is: 2 Number of rows sent to output is: 2 Elapsed Time is: 0.005 seconds --------------------------------------------- DB2SQL92> SELECT * FROM testtab WHERE b IS NULL; Statement # 26 : SELECT * FROM testtab WHERE b IS NULL LABEL A B -------------------------------------------------------- both null - - Number of rows retrieved is: 1 Number of rows sent to output is: 1 Elapsed Time is: 0.004 seconds --------------------------------------------- DB2SQL92> SELECT * FROM testtab WHERE b IS NOT NULL; Statement # 27 : SELECT * FROM testtab WHERE b IS NOT NULL LABEL A B -------------------------------------------------------- a null - b not null b empty string a a null, b empty string - equal non-empty strings x x non-equal non-empty strings x y Number of rows retrieved is: 5 Number of rows sent to output is: 5 Elapsed Time is: 0.005 seconds