pl sql not equal code example
Example: plsql not equal
SELECT 1 FROM dual
WHERE 1 != 2
OR 1 <> 2;
-- WARNING: the not equal operators do NOT check for NULL value:
-- myTable: ID(CHAR) | flag(NUMBER)
-- A 1
-- B 0
-- C NULL
SELECT ID FROM myTable t
WHERE t.flag != 1;
-- returns B
SELECT ID FROM myTable t
WHERE t.flag != 1 OR t.flag IS NULL;
-- returns B and C