Using Inequalities

An inequality is a comparison using less than (<), greater than (>) or not equal to (<>) signs. The first two can be combined with an equal sign to give less than or equal to (<=) and greater than or equal to (>=) comparisons.

Suppose a potential house buyer came into the Estate Agent's office asking for a list of houses for sale up to £40000. You could produce a list using a similar query containing a Price field with a Criteria entry "<=40000" meaning less than or equal to £40,000.

Don't forget to show the conditional field in your list in order to confirm whether your query is correct - clicking on the tick in the Show row will determine whether it appears in the query dynaset.

Using this method, list and print the ID, address, area and postcode of:

  • Property with a sale price less than £50000 using the (< 50000) inequality.
  • Property with more than one garage using the (> 1) inequality.
  • Property with more than two bedrooms.

Contents: Databases

Skill Check: Databases