Working with Data
Go Up to Embedded SQL Guide
The majority of SQL statements in an embedded program are devoted to reading or modifying existing data, or adding new data to a database. This chapter describes the types of data recognized by InterBase, and how to retrieve, modify, add, or delete data in a database using SQL expressions and the following statements.
SELECT statements query a database, that is, read or retrieve existing data from a database. Variations of the
SELECT statement make it possible to retrieve:
- A single row, or part of a row, from a table. This operation is referred to as a singleton select.
- Multiple rows, or parts of rows, from a table using a
- Related rows, or parts of rows, from two or more tables into a virtual table, or results table. This operation is referred to as a join.
- All rows, or parts of rows, from two or more tables into a virtual table. This operation is referred to as a union.
INSERTstatements write new rows of data to a table.
UPDATEstatements modify existing rows of data in a table.
DELETEstatements remove existing rows of data from a table.
To learn how to use the
SELECT statement to retrieve data, see Understanding Data Retrieval with SELECT. For information about retrieving a single row with
SELECT, see Selecting a Single Row. For information about retrieving multiple rows, see Selecting Multiple Rows.