HPlogo ALLBASE/SQL Reference Manual > Chapter 1 Introduction

SQL Language Structure

MPE documents

Complete PDF
Table of Contents
Index

E0300 Edition 9 ♥
E0399 Edition 8
E0897 Edition 7

SQL statements begin with a verb and can include clauses or names. For example:

   SELECT PartNumber FROM PurchDB.Parts
     |        |      |       |     |  |
     |        |      |     owner   |  |
     |        |      |      name   |  |
     |        |      |             |  |
   statement  |      |          table |
    verb      |      |           name |
              |      |                |
           column    +----------------+
            name              |
                              |
                            FROM
                           clause

Statements always contain a verb, one or more words that describe the action of the statement. A statement can also contain one or more clauses. A clause is a group of names and keywords describing what the verb should operate on. A verb can operate on a named object, such as a table or a column. Some statements can contain expressions or search conditions. Expressions specify a value. Search conditions screen data against specific criteria:

   SELECT * FROM PurchDB.Parts WHERE SalesPrice > 200.00
          |                    |     |             |   |
         all                   |     |      expression |
       columns                 |     |                 |
                               |     +-----------------+
                               |             |         |
                               |     search condition  |
                               |                       |
                               +-----------------------+
                                          |
                                        WHERE
                                        clause

The syntax of SQL is fully described in chapters 7-12 of this manual.




ALLBASE/SQL Users


Using Comments within SQL Statements