SQL/MP Query Guide
Retrieving Data: How to Write Queries
HP NonStop SQL/MP Query Guide—524488-003
1-2
Using the SELECT Statement
SQL). For more information, see Using the SELECT Statement in Programs on
page 1-10.
These related topics, discussed in other manuals, might also be of interest:
•
To modify data with an UPDATE, INSERT, or DELETE statement, use query
components. For more information about UPDATE, INSERT, and DELETE
statements, see the SQL/MP Reference Manual and the SQL/MP Programming
Manual for your host language.
•
To modify data in a database being updated concurrently by other users or
programs, use transactions to preserve database consistency. The HP NonStop
Transaction Management Facility (TMF) simplifies the task of maintaining data
consistency.
For more information, see the TMF Reference Manual and the descriptions of the
BEGIN WORK, COMMIT WORK, and ROLLBACK WORK statements in the
SQL/MP Reference Manual.
•
To customize query reports, use the SQLCI report writer. The report writer includes
report formatting commands, layout and style options, and report functions. For
more information, see the SQL/MP Report Writer Guide.
•
To change the default message file (and thus change the language used to display
messages) during an SQL session, use the =_SQL_MSG_system DEFINE,
described in the SQL/MP Reference Manual or in SQLCI online help.
Using the SELECT Statement
To retrieve data from an SQL database, use the SELECT statement. A SELECT
statement must contain a select list and a FROM clause:
•
The select list names the columns to be retrieved.
•
The FROM clause identifies the table or tables that contain the columns.
Note. If you are using multiple character sets, a SELECT statement might return column
contents that are not supported by some display and print devices.