🔧 Built-in Functions
SYSDATE, NVL, DECODE and other everyday Oracle functions.
| Snippet | |
|---|---|
| ☆SYSDATE — Current database date and time |
SELECT SYSDATE FROM dual;
|
| ☆NVL — Substitute NULLs with a default |
SELECT NVL(commission_pct, 0) FROM employees;
|
| ☆DECODE — Inline if-then-else in SQL |
SELECT DECODE(status, 'A', 'Active', 'I', 'Inactive', 'Unknown') FROM dual;
|