This set of SQL Server Multiple Choice Questions & Answers (MCQs) focuses on “DDL Triggers”.
1. _____________ is special type of trigger based on CLR environment.
a) DML
b) DDL
c) LOGON
d) CLR
View Answer
Explanation: CLR integration of triggers has been introduced with SQL Server 2008 and allows for triggers to be coded in one of .NET languages like C#, Visual Basic and F#.
2. Point out the correct statement.
a) Logon triggers are special type of trigger that fire when LOGON event of Sql Server is raised
b) DDL triggers are special type of trigger that fire when LOGON event of Sql Server is raised
c) DML triggers are special type of trigger that fire when LOGON event of Sql Server is raised
d) None of the mentioned
View Answer
Explanation: Logon event is raised when a user session is being established with Sql Server that is made after the authentication phase finishes.
3. DDL triggers can be applied to __________ statement.
a) CREATE
b) UPDATE
c) DELETE
d) INSERT
View Answer
Explanation: In SQL Server we can create triggers on DDL statements (like CREATE, ALTER, and DROP).
4. INSTEAD of clause cannot be used for ____________ trigger.
a) DML
b) DDL
c) LOGON
d) CLR
View Answer
Explanation: We can use only FOR/AFTER clause in DDL triggers not INSTEAD OF clause means we can make only After Trigger on DDL statements.
5. Point out the wrong statement.
a) DDL trigger can be used to observe and control actions performed on the server, and to audit these operations
b) DML trigger can be used to observe and control actions performed on the server, and to audit these operations
c) DDL triggers can be used to manage administrator tasks such as auditing and regulating database operations
d) None of the mentioned
View Answer
Explanation: DDL triggers are a special kind of trigger that fire in response to Data Definition Language (DDL) statements.
6. Purpose of DDL Trigger is to _____________
a) Perform administrative tasks
b) Audit
c) Regulating database operations
d) All of the mentioned
View Answer
Explanation: DDL triggers fire in response to a variety of Data Definition Language (DDL) events.
7. DDL triggers can only fire after the ______ statement has occurred.
a) DML
b) CLR
c) DDL
d) All of the mentioned
View Answer
Explanation: DDL Triggers can be set with either a Server scope or database scope.
8. How many types of DDL Trigger is present in SQL Server?
a) 1
b) 2
c) 3
d) 4
View Answer
Explanation: Transact-SQL DDL Trigger and CLR DDL Trigger are two types of DDL Trigger.
9. ____________ triggers do not create the special inserted and deleted tables.
a) DML
b) CLR
c) DDL
d) All of the mentioned
View Answer
Explanation: DDL triggers do not fire in response to events that affect local or global temporary tables and stored procedures.
10. Scope of DDL triggers in SQL Server can be _____________
a) Server
b) Client
c) Views
d) None of the mentioned
View Answer
Explanation: DDL triggers can be server-scoped or database-scoped. A database-scoped DDL trigger is simply called a database trigger.
Sanfoundry Global Education & Learning Series – SQL Server.
To practice all areas of SQL Server, here is complete set of 1000+ Multiple Choice Questions and Answers.
- Apply for Programming Internship
- Check SQL Server Books
- Practice Programming MCQs
- Check Information Technology Books