SQL - Predicate

About

Predicate is an expression that evaluates to TRUE, FALSE, or UNKNOWN.

You have two principal types of predicates:

  • join predicates
  • or filter predicates

Predicates are used in:

  • WHERE clauses,
  • HAVING clauses,
  • JOIN conditions,
  • FROM clauses,

and other constructs where a Boolean value is required.

Articles Related

Example of Predicates Operator

  • BETWEEN
  • EXISTS
  • IN
  • IS [NOT] NULL
  • LIKE

Example of predicates information

The output of an Oracle explain plain contains a predicate information section. You can see for instance the the filter clause but also the join clause.

Predicate Information (identified by operation id):
---------------------------------------------------

   2 - access("I1"."N"="MAP"."I2")
   3 - filter("I1"."V"='cx')
   5 - filter("I2"."V"='y')
   6 - access("I2"."N"="MAP"."I2")
  • Bookmark "SQL - Predicate" at del.icio.us
  • Bookmark "SQL - Predicate" at Digg
  • Bookmark "SQL - Predicate" at Ask
  • Bookmark "SQL - Predicate" at Google
  • Bookmark "SQL - Predicate" at StumbleUpon
  • Bookmark "SQL - Predicate" at Technorati
  • Bookmark "SQL - Predicate" at Live Bookmarks
  • Bookmark "SQL - Predicate" at Yahoo! Myweb
  • Bookmark "SQL - Predicate" at Facebook
  • Bookmark "SQL - Predicate" at Yahoo! Bookmarks
  • Bookmark "SQL - Predicate" at Twitter
  • Bookmark "SQL - Predicate" at myAOL
 
language/sql/predicate.txt · Last modified: 2010/12/04 15:07 by gerardnico