What is a correlated subquery?
A correlated subquery references columns from the outer query. It may be evaluated in a way that depends on each outer row, though optimizers can
The question library
Explore practical questions, clear explanations, and code examples across developer technologies.
Showing 3301–3312 of 3610 questions
A correlated subquery references columns from the outer query. It may be evaluated in a way that depends on each outer row, though optimizers can
EXISTS expresses whether a matching row exists and is often natural for semi-join logic. IN compares against a set; NULL semantics can make NOT I
A composite index is ordered by its leading columns. Choose column order based on equality predicates, range predicates, joins, ordering, selecti
A covering index contains the key and included columns needed by a query, allowing the engine to satisfy it without extra base-table lookups in s
A SARGable predicate can use an index search effectively. Applying functions or conversions to indexed columns may prevent a seek; prefer equival
Inspect actual versus estimated row counts, scans/seeks, join algorithms, sorts, spills, key lookups, and expensive operators. Use representative
A deadlock occurs when transactions wait cyclically on resources held by each other. Access resources in a consistent order, keep transactions sh
Read Uncommitted may permit dirty reads; Read Committed prevents dirty reads; Repeatable Read protects rows already read from changes; Serializab
Atomicity means all-or-nothing; consistency preserves declared rules; isolation controls concurrent transaction interference; durability means co
3NF reduces problematic transitive dependencies so non-key attributes depend on keys rather than other non-key attributes. Normalize to protect c
ON DELETE CASCADE removes dependent rows when a referenced parent is deleted. Use it only when child rows have no independent lifecycle; otherwis
An upsert inserts when a row is absent and updates when it exists. Use engine-supported syntax and a unique constraint to enforce identity; concu