A script-enabled browser is required for this page to function properly.

About conditions (Query Builder)

A condition is a text phrase you place in a query to target the information you want and filter out information you do not want. Conditions can save you time and make your queries more focused, because they enable you to retrieve columns of the table. Note:  When you select a column object from a table, Query Builder automatically uses the table alias in your query.  Likewise, if you include a column object in the Condition field and accept the condition, Query Builder automatically inserts the appropriate table aliases into your condition.

For example, say you included the Employee table in your query, and selected the Name, Salary, and Job title columns. Without conditions you've essentially said to the database "Select all the employee data from the Name, Salary, and Job columns in the Employee table." Now you can add conditions to your original request, such as, "where...

Instead of typing all the words shown in the preceding examples into the condition, you use operators, so the condition almost looks like a formula. For example, to specify employees whose salaries are greater than $3000, you might type:

SALARY > 3000

You can also use functions to help you create complex conditions.

Condition example

Suppose you want to create a query where you view data for the state of California only.

  1. In the Query window, click the condition field in the Conditions panel to activate it.

  2. Select the State column (either select the check box next to the column, or double-click the column name) in the appropriate table in the Data Source panel. The word STATE appears in the condition field.

  3. Type the EQUALS (=) symbol.

  4. Type 'CA' to the right of the equals sign in the condition field.

The condition should now look like this: STATE='CA'

See also

Adding conditions to a query (Query Builder)

 

Condition syntax (Query Builder)

 

Controlling join conditions in linked queries (Query Builder)

 

Creating a negating condition (Query Builder)

 

Creating a nested condition (Query Builder)

 

Pasting a function (Query Builder)