Loading topic
SELECT, WHERE and ORDER BY cover many queries. Sooner or later you need the value in a column to depend on a condition that is checked row by row. This chapter explains why that need arises, which6 min readSELECT with WHERE and ORDER BY. It also assumes you know the common Oracle data types (NUMBER, VARCHAR2, DATE) and that NULL means "unknown or missing". The examples use the Oracle HR sample schema, mainly the employees table.5 min readSELECT with WHERE and ORDER BY. It also assumes you know the basic Oracle types (NUMBER, VARCHAR2, DATE) and that you know NULL means "no value". The examples use the Oracle HR sample schema, mainly the employees table.6 min readWHEN NULL never matches, how NULL slips into the wrong branch of a searched CASE, and how to write NULL-safe conditi5 min reademployees table5 min reademployees, with department_id, job_id, salary and commission_pct).5 min readORA-00932, and h6 min read= NULL never evaluates to true, and have used DECODE. The examples use t5 min readDECLARE, BEGIN, END). PL/SQL is Oracle's procedural extension to SQL. It has two different CASE constructs that look almost the same. Knowi6 min readCASE and DECODE code in Oracle, and the habits that prevent them. It assumes you can write simple and searched CASE, call DECODE, and use GROUP BY with aggregates. The examples use the employees table from the HR sample schema.5 min read