EasyManua.ls Logo

HP NonStop SQL/MP - 4. Data Retrieval and Modification

HP NonStop SQL/MP
331 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
HP NonStop SQL/MP Programming Manual for C429847-008
4-1
4 Data Retrieval and Modification
You can access data in an SQL/MP database using this Data Manipulation Language
(DML) statements in a C program:
Simple data manipulations––SELECT (single-row), INSERT, UPDATE, and
DELETE statements
Cursor operations––DECLARE CURSOR, OPEN, FETCH, and CLOSE statements
where the cursor contains a SELECT, UPDATE, or DELETE statement
Topics include:
Opening and Closing Tables and Views on page 4-2
Single-Row SELECT Statement on page 4-4
Multirow SELECT Statement on page 4-6
INSERT Statement on page 4-8
UPDATE Statement on page 4-10
DELETE Statement on page 4-12
Using SQL Cursors on page 4-14
Table 4-1 provides some guidelines for using these statements.
Table 4-1. SQL/MP Statements for Data Retrieval and Modification (page 1 of 2)
SQL/MP Statement Description
Single-Row SELECT statement Retrieves a single row of data from a table or
protection view and places the specified column
values in host variables. Use when you need to
retrieve only a single row.
SELECT statement with a cursor Retrieves a set of rows from a table or view, one row
at a time, and places the specified column values in
host variables. Use when you need to retrieve more
than one row.
INSERT statement Inserts one or more rows into a table or protection
view. Use for all INSERT operations.
UPDATE statement without a cursor Updates the values in one or more columns in a
single row or a set of rows of a table or protection
view. Use when you do not need to test a column
value in a row before you update the row.

Table of Contents

Related product manuals