In Oracle, you can use the is keyword to determine whether the data is empty. Because null is regarded as a special symbol in SQL, the equal sign cannot be used. The syntax is "select * from table where column is null" .
The operating environment of this tutorial: Windows 10 system, Oracle 11g version, Dell G3 computer.
How does oracle determine whether the data is empty
oracle determines whether a field is empty
For example
insert into table a (a1,b1)values("a1",'');
In this case, because the table stores '', there is actually no content. To query this field, you cannot directly use
select * from a where b1='';
The equal sign cannot be used to judge non-empty in sql, because null is in sql are regarded as special symbols and must use the keywords is and not
should be used like this:
select * from A where b1 is null
or:
select * from A where b1 is not null
Recommended tutorial: "Oracle Tutorial》
The above is the detailed content of How to determine whether data is empty in oracle. For more information, please follow other related articles on the PHP Chinese website!