databases Online Quiz - 90
|Description: databases Online Quiz - 90|
|Number of Questions: 20|
|Created by: Aliensbrain Bot|
Which of the below commands is used to find more information about the SQL Server installed such as edition, product level etc. ?
What is ACID property?
Which of the following are different locks in SQL SERVER?
Which of the following statements about subqueries are true? (Choose 3)
A UNION of two or more queries is valid provided the queries meet which of the following conditions? (Choose 3)
Choose the correct statements about the union clause in ASE (Choose 2)
Table t and trigger trig are created as follows: create table t (a int) go create trigger trig on t for insert, update, delete as begin if @@rowcount > 1 rollback trigger end go The following transaction is now executed: begin tran insert t values (1) insert t values (2) insert t select * from t insert t values (3) commit go After completing this transaction, how many rows will table t contain?
Which T-SQL elements can be used in a stored procedure? (Choose 2)
Which ASE table contains the source code of a stored procedure?
What is the maximum number of characters that can be passed to a stored procedure through a single char or varchar parameter without being truncated?
The following trigger exists: create trigger trig on t for insert, update, delete as begin print 'This is 'trig' ' end The following command is now executed: create trigger trig on t for insert as begin print 'This is 'trig' ' end After executing this command, for which DML actions on table 't' will a trigger be fired?
Creation of which DB objects will cause a DDL trigger to fire?
To answer this question, the user needs to know the purpose of a trigger and what it can do.
A trigger is a set of instructions that are automatically executed in response to certain events in the database. A call statement inside the trigger body enables you to call other procedures or functions.
Now, let's go through each option and explain why it is right or wrong:
A. Package: A package is a collection of related functions, procedures, and other program objects. While a trigger can call a procedure or a function inside a package, it cannot directly call a package.
B. Function: A function is a named PL/SQL block that returns a value. A trigger can call a function to retrieve a value and use it in the execution of the trigger.
C. Procedure: A procedure is a named PL/SQL block that performs one or more specific tasks. A trigger can call a procedure to perform a specific task as part of the execution of the trigger.
D. Another DB trigger: A trigger can call another trigger inside the same schema, but it cannot call a trigger in another schema.
Therefore, the correct answer is:
The Answer is: C. Procedure
What part of a DB trigger determines the number of times a trigger body executes?