Sometimes people speak “SQL” and expect you know all the terminology. In recent conversation about query plans I was ranting on and on about how the predicates were written when the person stopped me and asked a very simple question. Like a lightbulb going off, it reminded me that not everyone knows what the other person is talking about when terminology is mentioned without clarification.
So, this post will answer that persons very valid simple question.
What is a SQL Predicate?
Predicates are expressions that evaluate to TRUE, FALSE, UNKNOWN. There are two types of predicates Filtered Predicates and Join Predicates.
Filtered Predicates cover your WHERE or HAVING clauses in your query. They are essentially search criteria.
JOIN Predicates cover your FROM clauses in your query. They are essentially merge criteria so to speak. They bring two or more tables together based on the join criteria.
So, there it is. Just a simple blog to answer a great question. Don’t ever be afraid to stop someone and ask a question, no matter how simple the question may be. Knowing the terminology is important. I stop and ask people to clarify terminology all the time during their presentations or a conversation between my co-workers.
Contact the Author | Contact DCAC