HPlogo ALLBASE/SQL Reference Manual > Chapter 1 Introduction

Using Queries

MPE documents

Complete PDF
Table of Contents
Index

E0300 Edition 9 ♥
E0399 Edition 8
E0897 Edition 7

After connecting to a DBEnvironment, you use queries to retrieve data from database tables. A query is a statement in which you describe the data you want to retrieve. In ALLBASE/SQL, a query is performed by using the SELECT statement. For example:

  SELECT PartName, SalesPrice
    FROM PurchDB.Parts
   WHERE PartNumber = '1123-P-01'
      OR PartNumber = '1133-P-01'

The result of a query is called a query result. In the case of the query above, which retrieves the name and selling price of two parts from the table named PurchDB.Parts, the result is a table made up of two columns and two rows:

   -----------------------------------------
   PARTNAME                      |SALESPRICE
   ------------------------------+----------
   Central Processor             |    500.00
   Communication Processor       |    200.00

A detailed presentation of queries and other forms of data manipulation appears in the "SQL Queries" chapter.




ALLBASE/SQL Data Access


ALLBASE/SQL Objects