Specifications

SQL Language
The Structured Query Language (SQL ) is used to retrieve, sort, and filter specific data from a
database ; it is not possible within this on-line help to give a full tutorial of this programming
language ; however the following basics will make it possible to create current queries
necessary for the compilation of varied reports.
More information can be found on the Microsoft's MSDN under SQL Expressions and on many
other web sites.
Basics
SQL queries selects particular records from a database. Typically, an SQL query contains a
select statement and a clause with one or more logical conditions.
SELECT statement
The SELECT statement queries the database in order to extract the records matching
specified criteria. SELECT can be followed by * or DISTINCT.
SELECT * : selects all of the records that meet the conditions in the SQL statement
SELECT DISTINCT field : omits records that contain duplicate data in the selected
field (makes possible to select the different values for the specified field)
Clauses
FROM specifies the tables or queries that contain the fields listed in the select
statement
WHERE specifies which records from the table are affected by the select statement
ORDER BY sorts a query's resulting records on a specified field or fields
Operators
Logical operators
The logical operators are used to compose an expression that records must satisfy to be
included in the query results. Available operators are AND OR NOT.
Relational operators
Relational operators allow the comparison of the relative values of two expressions. Available
operators are the following :
< Less than
<= Less than or equal to
> Greater than
Page 373