Of Interest
Business Intelligence and Analytics
Oracle Training
|
Oracle
»
PL-SQL
»
NULL
»
NULLIF Function
This function allows override certain values with NULL - handy for avoiding division by zero.
Example:
select emp_id, (total_hours / NULLIF(overtime_hours,0) ) from timecard ;
In this example, the hourly data is returned as null if the overtime_hours column containts zero.
|
|
|
Get the latest Rocket99 news and tech tips via
|