PUT statement [ESQL]
PUT statement [ESQL]
Function
Syntax
Permissions
Side effects
See also
Description
582
Use this statement to insert a row into the specified cursor.
PUT cursor-name
... [ USING DESCRIPTOR sqlda-name | FROM host-variable-list ]
... [ INTO { DESCRIPTOR into-sqlda - name | into-host - variable-list } ]
... [ ARRAY : nnn ]
cursor-name :
identifier or host-variable
sqlda-name :
identifier
host-variable-list : may contain indicator variables
Must have INSERT permission.
When the cursor was defined using a join of two or more tables, inserting a
row into the cursor may require the database server to insert a row into more
than one of the tables involved in the join.
"UPDATE statement" on page 637
"UPDATE (positioned) statement" on page 641
"DELETE statement" on page 496
"DELETE (positioned) statement" on page 498
"INSERT statement" on page 554
Inserts a row into the named cursor. Values for the columns are taken from
the first SQLDA or the host variable list, in a one-to-one correspondence
with the columns in the INSERT statement (for an INSERT cursor) or the
columns in the select list (for a SELECT cursor).
The PUT statement can be used only on a cursor over an INSERT or
SELECT statement that references a single table in the FROM clause, or that
references an updatable view consisting of a single base table.
If the sqldata pointer in the SQLDA is the null pointer, no value is specified
for that column. If the column has a DEFAULT VALUE associated with it,
that will be used; otherwise, a NULL value will be used.
The second SQLDA or host variable list contains the results of the PUT
statement.
The optional ARRAY clause can be used to carry out wide puts, which insert
more than one row at a time and which may improve performance. The value
nnn is the number of rows to be inserted. The SQLDA must contain nnn *
(columns per row) variables. The first row is placed in SQLDA variables 0
to (columns per row)-1, and so on.
Need help?
Do you have a question about the Adaptive Server Anywhere and is the answer not in the manual?
Questions and answers