exceptions

Thumbnail image for Why the SQL WITH clause is not exactly like a function definition

Why the SQL WITH clause is not exactly like a function definition

The SQL WITH clause is similar in concept to a function definition in procedural code. In a function, we factor the common code, put it all together at one place and call it as many times as needed in the main program. That’s precisely how we use the WITH clause in SQL – factor out […]

Read the Full Article →
Thumbnail image for ORA-06592: CASE_NOT_FOUND Exception

ORA-06592: CASE_NOT_FOUND Exception

CASE is a smarter rewrite for IF-THEN-ELSE, we said. It is for sure, but there is a difference in the way the ELSE part of it is handled. Compare the code units below, one using CASE WHEN the other using IF-ELSIF. Both are identical in logic – two defined conditions, no ELSE path.

Read the Full Article →