wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

CS10337 - Lecture # 13

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

A trigger can fire automatically when an INSERT, UPDATE, or DELETE occurs on a table.

a)

True

b)

False

2.

MySQL allows multiple BEFORE INSERT triggers on the same table.

a)

False

b)

True

3.

Triggers can use the NEW and OLD keywords to access values before and after a row change.

a)

True

b)

False

4.

MySQL Events require the event scheduler to be ON in order to execute automatically.

a)

True

b)

False

5.

Triggers can return result sets to the client.

a)

True

b)

False

6.

Which of the following best describes a database trigger?

a)

A stored program that executes only when manually called

b)

A program that automatically executes in response to table events

c)

A program used only for reporting

d)

A view that stores old and new row versions

7.

Which keyword gives access to a row’s value before an UPDATE or DELETE?

a)

NEW

b)

PRIOR

c)

OLD

d)

BEFORE

8.

Which of the following is a valid reason to use a trigger?

a)

Displaying user interface messages

b)

Automatically enforcing business rules

c)

Formatting query results for reports

d)

Changing schema structure at runtime

9.

What is a MySQL Event primarily used for?

a)

Automatically running scheduled tasks

b)

Rendering complex views

c)

Storing copies of tables

d)

Speeding up SELECT queries

10.

Which of the following is required for MySQL Events to run automatically?

a)

Trigger chaining must be enabled

b)

ALL privileges on the schema

c)

Event scheduler must be ON

d)

A stored procedure must be attached