CodePudding user response:
It is good to use a decode:Decode (count (pk), 0, 0)
CodePudding user response:
Select sign (count (*)) from user_tables where table_name='TEST'CodePudding user response:
In case the when the where condition is not Null, no?CodePudding user response:
Select the decode (count (pk), 0, 0) from the table where pk=?CodePudding user response:
Is the primary key for a certain value, the means, actually have this record, only judge whether a field has a value,If so, you can use the decode, also can use the NVL
CodePudding user response:
One is to obtain rows, one is to determine whether a record is empty, don't know what you choose,CodePudding user response: