with clause

Thumbnail image for SQL to Find Master Records with Identical Detail Records

SQL to Find Master Records with Identical Detail Records

SQL to find those records in the master table that have identical detail records in a child table.

Read the Full Article →
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

SQL WITH clause appears similar in concept to a function definition in procedural code, but it differs in an important way in older Oracle versions. The error ORA-32035: unreferenced query name defined in WITH clause informs you about this difference.

Read the Full Article →
Thumbnail image for Write Smarter Queries with the SQL WITH Clause

Write Smarter Queries with the SQL WITH Clause

SQL WITH clause, or the subquery factoring clause, makes queries more efficient and readable. When a subquery is being processed multiple times, WITH lets you factor it out, give it a name and then reference the name wherever needed in the query.

Read the Full Article →