sql compare fields with some nulls
I"m trying to write a query in Oracle SQL to return rows if the value in field 1 does not equal the value in field 2 (where field2 includes some null values)
If the table looks like this
Field1 Field2
1 1
2 3
4
If I use this query:
select * from table where field1 != field2
I only get back row 2, but not row 3. Is there a single query I can use to get both rows 2,3 retreived?