Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

HCM21_CPL_JAVA_06    Tests & Quizzes

Tests & Quizzes

04_ASQL_Quiz2_SQL Advance 2
Return to Assessment List

Part 1 of 1 - 90.0/ 100.0 Points

Question 1 of 20
With this type of SQL Server cursor concurrency no lock is obtained until the user updates the data. 5.0/ 5.0 Points

A. OPTIMISTIC

B. PESSIMISTIC

C. SCROLL_LOCK

D. READ_ONLY

Question 2 of 20
Which of the following is true concerning triggers? 5.0/ 5.0 Points

A. They have an event, condition, and action.

B. They execute against only some applications that access a database.

C. You do not create them with SQL.

Question 3 of 20
Embedded SQL is which of the following? 5.0/ 5.0 Points

A. Hard-coded SQL statements in a program language such as Java.

B. The process of making an application capable of generating specific SQL code on the fly.

C. Hard-coded SQL statements in a procedure.

D. Hard-coded SQL statements in a trigger.

Question 4 of 20
SQL triggers are used for……………………… 5.0/ 5.0 Points

A. validity checking

B. providing default values

C. updating views

D. All of the mentioned options


Question 5 of 20
A _________________ is a program that performs some common action on database data and that is 5.0/ 5.0 Points
stored in the database.

A. trigger

B. stored procedure

C. pseudo file

D. None of the above is correct.

Question 6 of 20
The following SQL statement is curror B’s data manipulation for table A. Which is the correct character 0.0/ 5.0 Points
string to be entered in the blank?
UPDATE A SET A2=1, A3=2 WHERE ……………….
A(A1, A2, A3) is the structure of table A, the underline indicates the primary key

A. CURRENT OF B

B. A1=B OF A

C. A1=B

D. A1=CURRENT OF B

Question 7 of 20
Which of the following statements is true concerning routines and triggers? 5.0/ 5.0 Points

A. Both consist of procedural code.

B. Both have to be called to operate.

C. Both run automatically.

D. Both are stored in the database.

Question 8 of 20
Unlike application code, stored procedures are never distributed to _______________ 5.0/ 5.0 Points

A. the DBMS

B. the client computers

C. the network servers

D. the database servers

Question 9 of 20
Which SQL trigger does SQL Server NOT support? 5.0/ 5.0 Points
A. SQL Server supports all three.

B. BEFORE

C. INSTEAD OF

D. AFTER

Question 10 of 20
Because SQL statements are set-oriented, whereas programs are element-oriented, the results of SQL 5.0/ 5.0 Points
statements used in programs are accessed using …………………..

A. standard programming tools

B. an SQL trigger

C. an SQL cursor

D. custom written programming tools

Question 11 of 20
The code to create triggers and routines is stored in only one location and is administered centrally. 5.0/ 5.0 Points

True
False

Question 12 of 20
If a trigger is being written to enforce referential integrity actions, you cannot use …………. 0.0/ 5.0 Points

A. a BEFORE trigger

B. an INSTEAD OF trigger

C. an AFTER trigger

D. depending on the specific referential integrity action, either b or c may be disallowed

Question 13 of 20
Triggers are stored blocks of code that have to be called in order to operate. 5.0/ 5.0 Points

True
False

Question 14 of 20
Which of the following is not an ANSI SQL trigger? 5.0/ 5.0 Points

A. BEFORE INSERT

B. INSTEAD OF CONSTRAINT

C. BEFORE UPDATE
D. INSTEAD OF UPDATE

Question 15 of 20
Which type of SQL Server cursor concurrency places an update lock on a row when the row is read? 5.0/ 5.0 Points

A. READ_ONLY

B. OPTIMISTIC

C. READCOMMITTED

D. SCROLL_LOCK

Question 16 of 20
SQL triggers can be used when the DBMS receives a ____________request 5.0/ 5.0 Points

A. insert

B. delete

C. update

D. All of the mentioned options

Question 17 of 20
In a relational database system, which of the following SQL statements is used to extract rows specified 5.0/ 5.0 Points
by the cursor after it has been defined?

A. FETCH statement

B. DECLARE statement

C. READ statement

D. OPEN statement

Question 18 of 20
You have a third-party application that inserts data directly into a table. You add two new columns to the 5.0/ 5.0 Points
table. These columns cannot accept NULL values and cannot use default constraints. You need to ensure that the
new columns do not break the third-party application. What should you do?

A. Create an AFTER INSERT trigger.

B. Create a stored procedure.

C. Create an INSTEAD OF INSERT trigger.

D. Create a DDL trigger.

Question 19 of 20
Which of the three possible types of triggers does SQL Server support? 5.0/ 5.0 Points

A. INSTEAD OF only

B. INSTEAD OF and AFTER only

C. BEFORE only

D. AFTER only

Question 20 of 20
You are tasked to create a table that has a column that must store the current time accurate to ten 5.0/ 5.0 Points
microseconds. You need to use a system function in conjunction with the DEFAULT option in the column definition.
Which system function should you use?

A. SYSDATETIME

B. CURRENT_TIMESTAMP

C. GETUTCDATE

D. DATEADD

Gateway
Accessibility Information
The Sakai Project

Powered by Sakai
Copyright 2017 FPT-Software

You might also like