OTHER FUNCTIONS IN SQL

•NVL
– Converts a null value to actual value supplied as an argument.
–The 2nd argument is enclosed within the single quotation marks for columns with DATE, CHAR or VARCHAR2 data type.
•The syntax is: NVL (column, value)

•e.g.
NVL (commission, 0)
NVL (HireDate, ’01-JAN-06’)
NVL (MidTerm, ‘ No Grade Entered’)
SELECT Lname, Salary+NVL ( commission, 0) TOTALSALARY
FROM employee;
LNAME TOTALSALARY
Post a Comment