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.

 

 

News
7/13/2004
COMDLG32.OCX error at startup
6/29/2004
Opening FoxPro and dBase databases
1/11/2024
Version 1.1.7 Relased (1/11/2024)
11/18/2002
Version 1.1.0 Relased (11/16/2002)
10/20/2002
HotFix 1 for Windows XP SP1

Forums
8/10/2024
removing duplicate records
8/8/2024
data validation and BaseNow
1/24/2007
Outlook 2003
1/12/2024
BASENOW AND FOXPRO DATE FORMATS
11/6/2024
Need help in Sybase Anywhere database
10/19/2006
need help! mysql query
6/21/2006
Compare SQl fields
6/8/2024
Error