Professional Documents
Culture Documents
04 - ASQL - Quiz2 - SQL Advance 2: Tests & Quizzes
04 - ASQL - Quiz2 - SQL Advance 2: Tests & Quizzes
04_ASQL_Quiz2_SQL Advance 2
Show Feedback | Table of Contents
Part 1 of 1 -
Question 1 of 20
A _________________ is a program that performs some common action on database data and that 5.0 Points
is stored in the database.
A. trigger
B. stored procedure
C. pseudo file
Reset Selection
Question 2 of 20
SQL Server program code that is executed after an SQL command has been processed is called 5.0 Points
a(n):
A. AFTER trigger.
B. BEGIN trigger.
C. INSTEAD OF trigger.
D. BEFORE trigger.
Reset Selection
Question 3 of 20
Stored procedures have the advantage of ………………… 5.0 Points
A. greater security
https://gst.fsoft.com.vn/portal/site/b0d8cac9-9f19-4f09-9eb7-71661cf003c0/tool/e2c4d983-f0d7-4b16-b69b-7235434d4adb/jsf/delivery/beginTakingAss… 1/7
5/13/2021 campuslink.admin : HCM21_CPL_JAVA_05 : Tests & Quizzes
Reset Selection
Question 4 of 20
Your database contains two tables named DomesticSalesOrders and InternationalSalesOrders. 5.0 Points
Both tables contain more than 100 million rows. Each table has a Primary Key column named SalesOrderId.
The data in the two tables is distinct from one another. Business users want a report that includes aggregate
information about the total number of global sales and total sales amounts. You need to ensure that your
query executes in the minimum possible time. Which query should you use?
Reset Selection
Question 5 of 20
SQL Server 2000 stored procedures can: 5.0 Points
https://gst.fsoft.com.vn/portal/site/b0d8cac9-9f19-4f09-9eb7-71661cf003c0/tool/e2c4d983-f0d7-4b16-b69b-7235434d4adb/jsf/delivery/beginTakingAss… 2/7
5/13/2021 campuslink.admin : HCM21_CPL_JAVA_05 : Tests & Quizzes
Reset Selection
Question 6 of 20
Which SQL trigger does SQL Server NOT support? 5.0 Points
A. AFTER
B. BEFORE
C. INSTEAD OF
Reset Selection
Question 7 of 20
Embedded SQL is which of the following? 5.0 Points
D. The process of making an application capable of generating specific SQL code on the fly.
Reset Selection
Question 8 of 20
You need to identify, within a given clause, if the month of February will contain 29 days for a 5.0 Points
specified year. Which object should you use?
A. Table-valued function
B. DML trigger
C. Scalar-valued function
D. Stored procedure
Reset Selection
Question 9 of 20
stored program that is attached to a table or view is called __________________ 5.0 Points
https://gst.fsoft.com.vn/portal/site/b0d8cac9-9f19-4f09-9eb7-71661cf003c0/tool/e2c4d983-f0d7-4b16-b69b-7235434d4adb/jsf/delivery/beginTakingAss… 3/7
5/13/2021 campuslink.admin : HCM21_CPL_JAVA_05 : Tests & Quizzes
A. a trigger
B. a CHECK constraint
C. a view
D. embedded SQL
Reset Selection
Question 10 of 20
SQL Server program code that is executed instead of an SQL command that needs to be processed 5.0 Points
is called a(n):
A. BEFORE trigger.
B. INSTEAD OF trigger.
C. AFTER trigger.
D. BEGIN trigger.
Reset Selection
Question 11 of 20
A function returns one value and has only output parameters. 5.0 Points
True
False
Reset Selection
Question 12 of 20
Triggers are stored blocks of code that have to be called in order to operate. 5.0 Points
True
False
Reset Selection
Question 13 of 20
You have been tasked to delete a number of Database Mail messages that have been sent. You 5.0 Points
need to delete all the emails that were sent more than one month ago. Which Transact-SQL statements
should you run?
https://gst.fsoft.com.vn/portal/site/b0d8cac9-9f19-4f09-9eb7-71661cf003c0/tool/e2c4d983-f0d7-4b16-b69b-7235434d4adb/jsf/delivery/beginTakingAss… 4/7
5/13/2021 campuslink.admin : HCM21_CPL_JAVA_05 : Tests & Quizzes
Reset Selection
Question 14 of 20
Which of the three possible types of triggers does SQL Server support? 5.0 Points
A. AFTER only
C. BEFORE only
D. INSTEAD OF only
Reset Selection
Question 15 of 20
A _______________ is a stored program that is attached to a table or a view. 5.0 Points
A. pseudofile
C. trigger
Reset Selection
Question 16 of 20
What is not an advantage of stored procedures? 5.0 Points
B. Greater security
D. Code sharing
Reset Selection
Question 17 of 20
The Enterprise manager cannot be used to modify stored procedures? 5.0 Points
True
False
https://gst.fsoft.com.vn/portal/site/b0d8cac9-9f19-4f09-9eb7-71661cf003c0/tool/e2c4d983-f0d7-4b16-b69b-7235434d4adb/jsf/delivery/beginTakingAss… 5/7
5/13/2021 campuslink.admin : HCM21_CPL_JAVA_05 : Tests & Quizzes
Reset Selection
Question 18 of 20
Which of the following is true concerning triggers? 5.0 Points
Reset Selection
Question 19 of 20
Because SQL stored procedures allow and encourage code sharing among developers, stored 5.0 Points
procedures give database application developers the advantages of ……………...
A. less work
B. standardized processing
Reset Selection
Question 20 of 20
You need to determine the result of executing this code segment. 5.0 Points
DECLARE @RangeStart INT = 0;
DECLARE @RangeEnd INT = 10000;
DECLARE @RangeStep INT = 1;
WITH NumberRange(ItemValue)
AS (
SELECT ItemValue
FROM (SELECT @RangeStart AS ItemValue) AS t
UNION ALL
SELECT ItemValue + @RangeStep
FROM NumberRange
WHERE ItemValue < @RangeEnd)
SELECT ItemValue
FROM NumberRange
OPTION (MAXRECURSION 100)
https://gst.fsoft.com.vn/portal/site/b0d8cac9-9f19-4f09-9eb7-71661cf003c0/tool/e2c4d983-f0d7-4b16-b69b-7235434d4adb/jsf/delivery/beginTakingAss… 6/7
5/13/2021 campuslink.admin : HCM21_CPL_JAVA_05 : Tests & Quizzes
Reset Selection
Gateway
Accessibility Information
The Sakai Project
Powered by Sakai
Copyright 2017 FPT-Software
https://gst.fsoft.com.vn/portal/site/b0d8cac9-9f19-4f09-9eb7-71661cf003c0/tool/e2c4d983-f0d7-4b16-b69b-7235434d4adb/jsf/delivery/beginTakingAss… 7/7