Difference between revisions of "ONCLOSE Table Constraint"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
Line 19: | Line 19: | ||
==Example== | ==Example== | ||
<code lang="recital"> | <code lang="recital"> | ||
− | ALTER TABLE customer modify ONCLOSE "p_close" | + | ALTER TABLE customer; |
+ | modify ONCLOSE "p_close" | ||
</code> | </code> | ||
Latest revision as of 10:52, 22 December 2009
Purpose
Table constraint activated when the table is closed
Syntax
ONCLOSE <procedure>
See Also
ALTER TABLE, CONSTRAINTS, CREATE TABLE
Description
A constraint is used to define rules that help to provide data integrity. TABLE constraints apply to table-based operations. You must have ALTER privilege on the table. The table will be locked for EXCLUSIVE use during the operation.
The ONCLOSE table constraint is activated when the table is closed. The <procedure> specified must be a character expression evaluating to a procedure name. If no file extension is included, '.prg' is assumed. The specified procedure is run before the operation to close the table is executed.
Example
ALTER TABLE customer; modify ONCLOSE "p_close"
Products
Recital, Recital Server