sql - Reduce the use of AND operator in Oracle while comparing multiple NULL values in different columns -
i want compare multiple column's null values. eg. assume have 3 columns in table have find out not null values. using following code :
select * table1 column1 not null , column2 not null , column3 not null
i don't want use code uses "and" multiple times if columns goes on increasing. have option in oracle 11g ?
i agree comment query fine is. if columns checking of numeric variety can use oracle's behavior null values advantage shorten query this:
select * table 1 ( column1 + column2 + column3 ) not null;
if of listed columns null sum null also. unfortunately, if have strings instead--null strings concatenate fine, same approach doesn't work them.
Comments
Post a Comment