answer the following questions so i can double check my work question 16 code a stat 5149691
answer the following questions so i can double check my work
Question 16
-
Code a statement that creates a table variable named @TestTable.
_____________________________________________________________________
10 points
Question 17
-
Code a statement that tests if the database named TestDB exists.
_____________________________________________________________________
10 points
Question 18
-
Controls the flow of execution based on a condition
try…catch
begin…end
goto
if…else
10 points
Question 19
-
Controls the flow of execution when an error occurs
try…catch
continue…error
declare
on error goto
10 points
Question 20
-
Declares a local variable.
set
declare
let
var
10 points
Question 21
-
Each of the following is a benefit provided by using views except for one. Which one is it?
a. You can create custom views to accommodate different needs.
b. You can simplify data retrieval by hiding multiple join conditions.
c. You can create a view that simplifies data insertion by hiding a complex INSERT statement within the view.
d. You can provide secure access to data by creating views that provide access only to certain columns or rows.
10 points
Question 22
-
Exits the innermost WHILE loop.
break
quit
goto
return
10 points
Question 23
-
If the ANSI_NULLS option is set to OFF, you can only test for null values in a column by using the IS NULL clause.
True
False
10 points
Question 24
-
If you create a database within a script, you have to execute the batch that contains the Create Database statement before you can execute other statements that refer to the database.
True
False
10 points
Question 25
-
If you need to store variables within a script, you can store them in:(choose all that apply)
global variables
scalar variables
vector variables
table variables
temporary variables
10 points
Question 26
-
One way to examine the system objects that define a database is to use the ______________________________ views.
10 points
Question 27
-
Returns the last value generated for an identity column on the server.
@@server_id
@@identity
@@last_gen
@@value
10 points
Question 28
-
Statements that must be run in their own batch.
create view
create function
create schema
create table
create trigger
create procedure
10 points
Question 29
-
The ____ option determines how null value are compared.
ascii_nulls
nulls_set
ansi_nulls
nulls_compare
10 points
Question 30
-
The name of a variable must always begin with
a letter
#
@
var_
10 points
Question 31
-
The statement
CREATE VIEW Example1
AS
SELECT VendorName, SUM(InvoiceTotal) AS SumOfInvoices
FROM Vendors JOIN Invoices ON Vendors.VendorID = Invoices.VendorID
GROUP BY VendorName
ORDER BY VendorName;a. will fail because the ORDER BY clause isn’t allowed in this view
b. will fail because the GROUP BY clause isn’t allowed in this view
c. will fail because the column alias SumOfInvoices is invalid
d. will succeed
10 points
Question 32
-
To control the flow of execution based on a true/false condition, you code a/an ______________________________ statement.
10 points
Question 33
-
To delete an existing view, you use the ______________________________ statement.
10 points
Question 34
-
To divide a script into multiple batches, you use the ______________________________ command.
10 points
Question 35
-
To execute Transact-SQL scripts from a command line, you can use the ______________________________ utility.