sqlplus statements for NULL values
The following oracle sql statement selects 1/1/2011 as dob when it is null:
SELECT name, NVL(dob,'1-JAN-2011') FROM Employee;
==========================
The following oracle sql statement selects 10 when quantity is null.
SELECT item_name, NVL(quantity, 10) From stock;
=================================
When the field value is in NUMBER, when it is null, i want to display the string "NULL". How do it in sqlplus?
select nvl( to_char(age), 'NULL' ) age
2 from emp where staff_no=2356;
=========================================
How to insert null value in field in sqlplus?
INSERT INTO emp VALUES ('shivaji', 250, null);
==========================================