lifeofpy
lifeofpy

Reputation: 93

How to validate nulls - oracle etl testing?

I am new to oracle and I would like to know how do we check the nulls in non null columns in oracle tables as part of the ETL testing process. (The two tables could be T1 and T2). Please let me know a sample query.

I have already tried

select count(*) from T2 where T2.column is Null;

Thanks, Santosh

Upvotes: 0

Views: 940

Answers (2)

Assume there is column name: id in the table record, and id should not contain any null value. Query to check this is:

select id from record where id is null;

Upvotes: 0

Mohd Ahmad
Mohd Ahmad

Reputation: 55

'=' operator can not be used while comparing to null. Replace '=' to 'is' as per below query.
select count(*) from T2 where T2.column is Null;

Upvotes: 1

Related Questions