HP Neoview SQL Reference Manual page 146

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

[OLD.]*
col-expr [[AS] name]
[AS] corr [(col-expr-list)]
specifies an optional correlation name and an optional column list for the preceding
items in the select list RETURNselect-list.
(update-statement [RETURN select-list]) [AS] corr [(col-expr-list)]
enables an application to read and update rows with a single operation. For the syntax
of update-statement, see the
RETURN select-list
specifies the columns or column expressions returned from the updated row. The
items in the select-list can be of these forms:
[OLD.| NEW.]*
col-expr [[AS] name]
[AS] corr [(col-expr-list)]
specifies an optional correlation name and an optional column list for the preceding
items in the select list RETURN select-list.
For example:
RETURN old.empno,old.salary,new.salary,
AS emp (empno, oldsalary, newsalary, increase).
(insert-statement [AS] corr [(col-expr-list)]
For the syntax of insert-statement, see the
[AS] corr [(col-expr-list)]
specifies an optional correlation name and an optional column list.
146
SQL Statements
specifies the row from the old table exposed by the embedded delete. The old
table refers to column values before the delete operation. NEW is not allowed.
An implicit OLD.* return list is assumed for a delete operation that does not
specify a return list.
specifies a derived column determined by the evaluation of an SQL value
expression in the list. Any column referred to in a value expression is from the
row in the old table exposed by the delete. The old table refers to column values
before the delete operation.
By using the AS clause, you can associate a derived column col-expr with a
name name.
specifies the row from the old or new table exposed by the update. The old table
refers to column values before the update operation; the new table refers to column
values after the update operation. If a column has not been updated, the new
value is equivalent to the old value.
An implicit NEW.* return list is assumed for an update operation that does not
specify a return list.
specifies a derived column determined by the evaluation of an SQL value
expression in the list. Any column referred to in a value expression can be specified
as being from the row in the old table exposed by the update or can be specified
as being from the row in the new table exposed by the update.
For example: RETURN old.empno,old.salary,new.salary, (new.salary
- old.salary).
By using the AS clause, you can associate a derived column col-expr with a
name name.
(new.salary - old.salary)
"UPDATE Statement" (page
"INSERT Statement" (page
169).
121).

Advertisement

Table of Contents
loading

Table of Contents