Unit 5 Flashcards

1
Q

A FOR trigger is the same as an AFTER trigger.

A

true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A trigger can be set to fire after the action query (AFTER) or instead of the action query (INSTEAD OF).

A

true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

If you want to prevent users from examining the SQL code that defines a procedure, function, or trigger, you code the CREATE statement with the ________________ option

A

ENCRYPTION

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

You can invoke a trigger directly.

A

false

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

A view can’t have an AFTER trigger.

A

true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

A table or view can have only one ______________ trigger.

A

INSTEAD OF

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

The ________ table contains the original rows for delete and update operations.

A

Deleted

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How would you code the INSTEAD OF clause for a trigger that’s fired whenever a view is deleted?

A

INSTEAD OF DROP_VIEW

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

A trigger can pass back a return value.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

If you delete a stored procedure, function, or trigger and then create it again

A

you delete the security permissions assigned to the object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

The ________ table contains the new rows for insert and update operations.

A

Inserted

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How would you code the ON clause for a trigger that’s fired after a table is deleted from the current database?

A

ON DATABASE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Each of the following statements about triggers is true except for one. Which one?

A trigger can’t be directly called or invoked.

A trigger doesn’t accept input or return output parameters.

A trigger can have more than one batch.

The code of a trigger can execute in place of the action query to which it’s assigned.

A

A trigger can have more than one batch.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

A _______ is a special kind of procedure that executes, or fires, in response to an action query.

A

trigger

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

You can pass parameters to a trigger.

A

false

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

A trigger is associated with a single table or view, which you identify in the ON clause.

A

true

17
Q

A table can have multiple AFTER triggers, even for the same action.

A

true

18
Q

Within a trigger, you can refer to two tables that are created by the system: _______________

A

Inserted and Deleted