Download Print this page

HEIDENHAIN MANUALplus 620 Technical Manual page 1627

Hide thumbs Also See for MANUALplus 620:

Advertisement

SQL COMMIT
SQL ROLLBACK
Command options
for SELECT and
UPDATE
WHERE
ORDER BY
FOR UPDATE
January 2012
The NC block SQL COMMIT cancels locks on table rows or table columns.
Edited table data are permanently transferred through SQL COMMIT.
The specified Q parameter is assigned a return code. If the command has
been completed successfully, the Q parameter is assigned a zero. If not, it is
assigned a one.
Definition
sql-commit := SQL COMMIT q-parameter sql-handle
Example:
SQL COMMIT Q80 HANDLE Q5
The NC block SQL ROLLBACK undoes a transaction. In particular, the lock on
rows in an SQL statement "SELECT ... FOR UPDATE" is canceled.
The specified Q parameter is assigned a return code. If the command has
been completed successfully, the Q parameter is assigned a zero. If not, it is
assigned a one.
If required, you can specify in the index the row for which the transaction is to
take effect.
Definition
sql-rollback := SQL ROLLBACK q-parameter sql-handle [ sql-index ]
Example:
SQL ROLLBACK Q80 HANDLE Q5
Command options allow you to define conditions, sorting sequences and locks
that modify the effect of a command.
The WHERE option limits the effect of a command to the rows of a table
which satisfy the specified condition.
Definition
where-option:= WHERE condition
The ORDER BY option influences the sequence of rows in the result set. At
present, it is only possible to sort by column (default ASC).
Definition
order-option:= ORDER BY column [ ASC | DESC ]
The FOR UPDATE option already locks the rows during selection (pessimistic
locking).
Without the FOR UPDATE option, the selected rows are not locked until the
COMMIT command is executed (optimistic locking).
Definition
update-option:= FOR UPDATE
8.12 Tables
1627

Advertisement

loading