NEW
Font size
WorksheetsCS10337 - Lecture # 13
Total questions: 10
Worksheet time: 5mins
A trigger can fire automatically when an INSERT, UPDATE, or DELETE occurs on a table.
True
False
MySQL allows multiple BEFORE INSERT triggers on the same table.
False
True
Triggers can use the NEW and OLD keywords to access values before and after a row change.
True
False
MySQL Events require the event scheduler to be ON in order to execute automatically.
True
False
Triggers can return result sets to the client.
True
False
Which of the following best describes a database trigger?
A stored program that executes only when manually called
A program that automatically executes in response to table events
A program used only for reporting
A view that stores old and new row versions
Which keyword gives access to a row’s value before an UPDATE or DELETE?
NEW
PRIOR
OLD
BEFORE
Which of the following is a valid reason to use a trigger?
Displaying user interface messages
Automatically enforcing business rules
Formatting query results for reports
Changing schema structure at runtime
What is a MySQL Event primarily used for?
Automatically running scheduled tasks
Rendering complex views
Storing copies of tables
Speeding up SELECT queries
Which of the following is required for MySQL Events to run automatically?
Trigger chaining must be enabled
ALL privileges on the schema
Event scheduler must be ON
A stored procedure must be attached
