CONDITIONALS are operators which allow you to get more specific (or general) in your query.

  • =: equals
  • <: less than
  • >: greater than
  • <=: less than or equal to
  • >=: greater than or equal to
  • !=: not equal to
  • IS NOT NULL: has any value
  • IS NULL: has no value at all
  • BETWEEN: within a specified range
  • NOT BETWEEN: outside of a specified range
  • OR: one of two equations are true
  • ||: same as OR
  • AND: both equations are true
  • &&: same as AND
  • NOT: both equations are false
  • !: same as NOT

The query will only pick out the rows that provide a TRUE result according to the WHERE equation. In this case, there would be TWO parts that must be true to return a result. Example...

The query would search the address_book table and compare all of the data in the first_name column AND the last_name column for the specified values. The WHILE loop then prints out the results found if both equations are found TRUE.

Table of Contents