Collections:
Test NULL Values in Oracle
How To Test NULL Values in Oracle?
✍: FYIcenter.com
There ate two special comparison operators you can use on NULL values:
The following sample script shows you examples of comparing NULL values:
DECLARE
next_task CHAR(80);
BEGIN
next_task := NULL;
IF next_task IS NOT NULL THEN
DBMS_OUTPUT.PUT_LINE('I am busy.');
ELSE
DBMS_OUTPUT.PUT_LINE('I am free.');
END IF;
IF next_task IS NULL THEN
NULL;
ELSE
DBMS_OUTPUT.PUT_LINE('... working on ' || next_task);
END IF;
END;
Note that "variable = NULL" is not a valid operation. This script should print this:
I am free.
⇒ Creating Oracle PL/SQL Procedures and Functions
⇐ What Is NULL in PL/SQL in Oracle
2018-07-13, 3023🔥, 0💬
Popular Posts:
Where to find reference information and tutorials on MySQL database functions? I want to know how to...
What Is the Difference Between GETDATE() and GETUTCDATE() in SQL Server Transact-SQL? The difference...
How To Select All Columns of All Rows from a Table in Oracle? The simplest query statement is the on...
How To Break Query Output into Pages in MySQL? If you have a query that returns hundreds of rows, an...
How To Calculate Age in Days, Hours and Minutes in SQL Server Transact-SQL? On many Web sites, news ...