Fujitsu 5.0L10 Server User Manual


 
Specify a comment for the NO column in the MASS_STOCK view.
Query specification
The query specification indicates which portion of the base table forms the view.
Example:
Define the view named MASS_STOCK. Let the ITMNO and STOCKQTY columns of the STOCK table
be the NO and QTY columns of the view, respectively.
Table (view) comment definition
A comment consisting of a character string can be specified for a view. A character string of up to 256 bytes can be
specified. If no comment is necessary, omit the specification. An example follows.
Example:
Specify a character string comment for the MASS_STOCK view.
2.6.6 Trigger definition
Define a trigger using the CREATE TRIGGER statement. In a trigger definition, specify a trigger event and a
procedure to be started. As the trigger event, specify a table data update method that starts the trigger. As the
procedure to be started, specify a procedure to be processed by a triggered SQL statement.
Triggers are classified into the following groups according to the purpose of the trigger:
· Simple trigger
· Update-and-add trigger
· Trigger for calling a procedure routine
Simple trigger
The user can define a simple operation, such as insertion of data into another table, deletion of data from another
table, or updating of data in another table, so that the operation is automatically executed when a table is updated.
Specify a simple INSERT, UPDATE, or DELETE statement as the triggered SQL statement.
The use can only define simple operations. However, the definition is easy because it is not required to define a
procedure routine.
The table updated using the SQL statement that is the source of the trigger cannot be updated using the triggered
SQL statement.
43