Opslag

Viser opslag fra oktober, 2025

Why we are missing the ANY keyword in SQL

Rethinking SQL: SELECT ANY, JOIN ANY, UPDATE ANY, DELETE ANY A small semantic shift that makes your intent explicit: do you expect data — or not? TL;DR Most SQL statements hide a key assumption: Do you expect the data to exist? SELECT ANY , JOIN ANY , UPDATE ANY , and DELETE ANY make that expectation explicit. ANY means: absence is acceptable. If you expect data, say so. If you don’t, say that too. Three small keywords. Infinite clarity. The missing expectation SQL silently blurs the line between “no data” and “wrong data”. A SELECT that returns zero rows isn’t technically an error — but sometimes, it should be. If you query configuration, or a required user profile, and nothing comes back, that’s not “empty” — that’s a logic failure . Right now, SQL can’t express that difference. You have to handle it in your code, check row counts, throw exceptions — boilerplate everywhere. It’s time SQL itself said what you mean. SELECT ANY – the tolerant query A plain SELEC...