MySQL Triggers
- Before MySQL 5.1.6 which privilege was required to create and drop triggers?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
The privilege to create and drop triggers is version specific in MySQL. Before MySQL 5.1.6, the SUPER privilege was needed. Access control is more correctly handled post this version.
- Which statement is used to remove a trigger?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
In order to delete a trigger, the DROP TRIGGER statement is used. The DROP TRIGGER construct is used by writing the phrase ‘DROP TRIGGER’ followed by the scheme name specification.
- For which of the following are triggers not supported?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
In MySQL, the triggers are run only after the table modifications like insert, update and delete are run. Triggers are not supported for views. In order to create a trigger, the CREATE TRIGGER statement is used.
- Which statement is used to create a trigger?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
In order to create a trigger, the CREATE TRIGGER statement is used. The definition indicates the particular type of statement for which the trigger activates and whether it activates before or after the rows are modified.
- Triggers enable to enforce data integrity constraints.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
In MySQL, a trigger can examine or change new data values to be inserted or used to update a row in a table. This enables the enforcement of the data integrity constraints.