Starting with jOOQ 3.17, the Condition type extends the Field<Boolean> type. Because, that's what the SQL standard thinks it is, in sorts: <boolean value expression> ::= <predicate> The exact definition contains intermediate rules, but you get the idea. A <predicate> (which is a Condition in jOOQ) can be used wherever a <boolean value expression> can … Continue reading A Condition is a Field
Tag: Predicate
The Difference Between SQL’s JOIN .. ON Clause and the Where Clause
A question that is frequently occurring among my SQL training's participants is: What's the difference between putting a predicate in the JOIN .. ON clause and the WHERE clause? I can definitely see how that's confusing some people, as there seems to be no difference at first sight, when running queries like these, e.g. in … Continue reading The Difference Between SQL’s JOIN .. ON Clause and the Where Clause
Why You Should (Sometimes) Avoid Expressions in SQL Predicates
I've recently discovered a rather significant performance issue on a productive Oracle 11g customer database. And I'm sure you have this issue too, which is why I'm documenting it here. This is a simplified representation of the setup at the customer site: ID PAYMENT_DATE TEXT ---------- ------------ ----------------------------------- 33803 21.05.16 DcTNBOrkQIgMtbietUWOsSFNMIqGLlDw... 29505 09.03.16 VIuPaOAQqzCMlFBYPQtvqUSbWYPDndJD... 10738 … Continue reading Why You Should (Sometimes) Avoid Expressions in SQL Predicates