HPlogo ALLBASE/SQL Reference Manual: HP 9000 Computer Systems > Chapter 1 Introduction

SQL Language Structure

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

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-10 of this manual.

Feedback to webmaster