BaseNow

 

  Search
   

  Help

Screen shots

Compare editions

Online help

Quick-start videos

System requirements

License agreement

Known issues

  Support

 Forums

Technical support

Feedback

 About the author

 Company

Contact

Privacy policy

  Features

BaseNow architecture

Database tools

BaseNow Agent

Tables and views

SQL Query Builder

Import/export data

  Subscribe

Stay informed about any major changes. Click here to subscribe

 

Filtering rows with WHERE and HAVING statements

WHERE and HAVING statements helps you place a query or an advanced filter to identify the specific records you want to work with. For example, instead of viewing all the rows in the Customers table, you can view just customers from Europe. To do this, you specify criteria that limits the results to records whose Region field is "Europe". The expression in this example would be "Europe". You can use more complicated expressions, however, such as "Between 1000 And 5000".

WHERE Statement

In SQL, search conditions appear in the WHERE clause of the statement, or if you are creating an aggregate query, in the HAVING clause. When the query runs, the database engine examines and applies the search condition to each row in the tables you are searching. If the row meets the condition, it is included in the query. For example, a search condition that would find all the employees in a particular region might be: region = 'UK'

HAVING Statement

The HAVING clause is typically used in conjunction with the GROUP BY clause, although it can be specified without GROUP BY. For example, the SQL statement with the HAVING clause might look like this:


Related Topics:

Performing Calculations

Sorting rows

Using joins

About SQL Query Builder

SQL Query Builder Layout

[Home] [Download] [Screen Shots] [Details] [Support] [Purchase]

Copyright © 1997-2005 Gate Comm Software. All Rights Reserved.