MS SQL Server Developer
MS SQL Server Developer
MS SQL Server Developer
A. DATE
B. NUMERIC
C. FLOAT
D. All of the above
Correct Answer: D
QUIZ ~ 2
Correct Answer: C
QUIZ ~ 3
Correct Answer: B
QUIZ ~ 4
A. =
B. LIKE
C. BETWEEN
D. All of the above
Correct Answer: D
QUIZ ~ 5
A. base table
B. index
C. view
D. none of the above
Correct Answer: C
QUIZ ~ 6
A file manipulation command that extracts some of the records from a file is called
A. SELECT
B. PROJECT
C. JOIN
D. PRODUCT
Correct Answer: A
QUIZ ~ 7
Correct Answer: C
QUIZ ~ 8
A. UPDATE
B. DROP
C. ALTER
D. DELETE
Correct Answer: C
QUIZ ~ 9
A data manipulation command the combines the records from one or more tables is
called
A. SELECT
B. PROJECT
C. JOIN
D. PRODUCT
Correct Answer: C
QUIZ ~ 10
View the Exhibit and examine the structure of the SALES, CUSTOMERS, PRODUCTS, and TIMES
tables.
The PROD_ID column is the foreign key in the SALES table, which references the PRODUCTS table.
Similarly, the CUST_ID and TIME_ID columns are also foreign keys in the SALES table referencing the
CUSTOMERS and TIMES tables, respectively.
Evaluate the following CREATE TABLE command:
CREATE TABLE new_sales(prod_id, cust_id, order_date DEFAULT SYSDATE)
AS
SELECT prod_id, cust_id, time_id
FROM sales;
Which statement is true regarding the above command?
A. The NEW_SALES table would not get created because the DEFAULT value cannot be specified in
thecolumn definition.
B. The NEW_SALES table would get created and all the NOT NULL constraints defined on the
specifiedcolumns would be passed to the new table.
C. The NEW_SALES table would not get created because the column names in the CREATE
TABLEcommand and the SELECT clause do not match.
D. The NEW_SALES table would get created and all the FOREIGN KEY constraints defined on the
specifiedcolumns would be passed to the new table.
Correct Answer: B
QUIZ ~ 11
Examine the description for the SALES table.
Which views can have all DML operations performed on it? (Choose all that apply.)
A. CREATE VIEW v3 AS SELECT * FROM SALES WHERE cust_id = 2034 WITH CHECK OPTION;
B. CREATE VIEW v1 AS SELECT * FROM SALES WHERE time_id<= SYSDATE - 2*365 WITH
CHECKOPTION;
C. CREATE VIEW v2 AS SELECT prod_id, cust_id, time_id FROM SALES WHERE time_id<= SYSDATE -
2*365 WITH CHECK OPTION;
D. CREATE VIEW v4 AS SELECT prod_id, cust_id, SUM(quantity_solD.FROM SALES WHERE time_id<=
SYSDATE - 2*365 GROUP BY prod_id, cust_id WITH CHECK OPTION;
Correct Answer: AB
QUIZ ~ 12
You need to extract details of those products in the SALES table where the PROD_ID column containsthe
string '_D123'.Which WHERE clause could be used in the SELECT statement to get the required output?
Correct Answer: B
QUIZ ~ 13 Which two statements are true regarding single row functions?
(Choose two.)
Correct Answer: DE
QUIZ ~ 14
Which SQL statements would display the value 1890.55 as $1,890.55? (Choose three
.)
A. SELECT TO_CHAR(1890.55,'$0G000D00')
FROM DUAL;
B. SELECT TO_CHAR(1890.55,'$9,999V99')
FROM DUAL;
C. SELECT TO_CHAR(1890.55,'$99,999D99')
FROM DUAL;
D. SELECT TO_CHAR(1890.55,'$99G999D00')
FROM DUAL;
E. SELECT TO_CHAR(1890.55,'$99G999D99')
FROM DUAL;
SHIPMENT_MODE VARCHAR2(30)
SHIPMENT_COST NUMBER(8,2)
You want to generate a report that displays the PO_ID and the penalty amount to be paid if the
SHIPMENT_DATE is later than one month from the PO_DATE. The penalty is $20 per day.
FROM shipments;
Correct Answer: C
QUIZ ~ 16 Which two statements are true regarding the USING and ON clauses in table joins?
(Choose two.)
A. Both USING and ON clauses can be used for equijoins and nonequijoins.
B. A maximum of one pair of columns can be joined between two tables using the ON clause.
C. The ON clause can be used to join tables on columns that have different names but compatible data types.
D. The WHERE clause can be used to apply additional conditions in SELECT statements containing the
ONor the USING clause.
Correct Answer: CD
QUIZ ~ 17
Correct Answer: D
QUIZ ~ 18
Correct Answer: D
QUIZ ~ 19
Examine the structure of the PRODUCTS
table.
You issue the following command to display the total price of each product after a discount of 25% and a tax
of 15% are applied on it. Freight charges of $100 have to be applied to all the products.
+(prod_list_price -(prod_list_price*(25/100))*(15/100))+100
AS "TOTAL PRICE"
FROM products;
What would be the outcome if all the parenthese s are removed from the above statement?
Correct Answer: B
QUIZ ~ 20
A. user data B.
metadata
C. reports
D. indexes
Correct Answer: C
QUIZ ~ 21
Correct Answer: C
QUIZ ~ 22
Correct Answer: A
QUIZ ~ 23
A. database
B. table
C. instance
D. relationship
Correct Answer: A
QUIZ ~ 24
You have run an SQL statement that asked the DBMS to display data in a table named USER_TABLES. The
results include columns of data labeled "TableName," "NumberOfColumns" and "PrimaryKey." You are looking
at ________ .
A. user data.
B. metadata
C. A report
D. indexes
Correct Answer: B
QUIZ ~ 25
Every time attribute A appears, it is matched with the same value of attribute B, but not the same value of
attribute C. Therefore, it is true that:
A. A ? B.
B. A ? C.
C. A ? (B,C).
D. (B,C.? A.
Correct Answer: A
QUIZ ~ 26
The different classes of relations created by the technique for preventing modification anomalies are
called:
A. normal forms.
B. referential integrity constraints.
C. functional dependencies.
D. None of the above is correct.
Correct Answer: A
QUIZ ~ 27
The primary key is selected from
the:
A. composite keys.
B. determinants.
C. candidate keys.
D. foreign keys.
Correct Answer: C
QUIZ ~ 28
A. tables.
B. rows.
C. relations.
D. attributes.
Correct Answer: D
QUIZ ~ 29
Examine the structure of the SALES, CUSTOMERS, PRODUCTS, and TIMES tables.
The PROD_ID column is the foreign key in the SALES table, which references the PRODUCTS table.
Similarly, the CUST_ID and TIME_ID columns are also foreign keys in the SALES table referencing the
CUSTOMERS and TIMES tables, respectively.
Evaluate the following CREATE TABLE command:
CREATE TABLE new_sales(prod_id, cust_id, order_date DEFAULT SYSDATE)
AS
SELECT prod_id, cust_id, time_id
FROM sales;
Which statement is true regarding the above command?
A. The NEW_SALES table would not get created because the DEFAULT value cannot be specified in
thecolumn definition.
B. The NEW_SALES table would get created and all the NOT NULL constraints defined on the
specifiedcolumns would be passed to the new table.
C. The NEW_SALES table would not get created because the column names in the CREATE TABLE
command and the SELECT clause do not match.
D. The NEW_SALES table would get created and all the FOREIGN KEY constraints defined on the
specifiedcolumns would be passed to the new table.
Correct Answer: B
QUIZ ~ 30
Examine the description for the SALES table.
Which views can have all DML operations performed on it? (Choose all that apply.)
A. CREATE VIEW v3 AS SELECT * FROM SALES WHERE cust_id = 2034 WITH CHECK OPTION;
B. CREATE VIEW v1 AS SELECT * FROM SALES WHERE time_id<= SYSDATE - 2*365 WITH
CHECKOPTION;
C. CREATE VIEW v2 AS SELECT prod_id, cust_id, time_id FROM SALES WHERE time_id<= SYSDATE -
2*365 WITH CHECK OPTION;
D. CREATE VIEW v4 AS SELECT prod_id, cust_id, SUM(quantity_solD.FROM SALES WHERE time_id<=
SYSDATE - 2*365 GROUP BY prod_id, cust_id WITH CHECK OPTION;
Correct Answer: AB
QUIZ ~ 31
You need to extract details of those products in the SALES table where the PROD_ID column containsthe
string '_D123'.Which WHERE clause could be used in the SELECT statement to get the required output?
Correct Answer: B
QUIZ ~ 32 Which two statements are true regarding single row functions?
(Choose two.)
Correct Answer: DE
QUIZ ~ 33
Which SQL statements would display the value 1890.55 as $1,890.55? (Choose three
.)
A. SELECT TO_CHAR(1890.55,'$0G000D00')
FROM DUAL;
B. SELECT TO_CHAR(1890.55,'$9,999V99')
FROM DUAL;
C. SELECT TO_CHAR(1890.55,'$99,999D99')
FROM DUAL;
D. SELECT TO_CHAR(1890.55,'$99G999D00')
FROM DUAL;
E. SELECT TO_CHAR(1890.55,'$99G999D99')
FROM DUAL;
QUIZ ~ 34
Examine the structure of the SHIPMENTS table:
name Null Type
PO_ID NOT NULL NUMBER(3)
PO_DATE NOT NULL DATE
SHIPMENT_DATE NOT NULL DATE
SHIPMENT_MODE VARCHAR2(30)
SHIPMENT_COST NUMBER(8,2)
You want to generate a report that displays the PO_ID and the penalty amount to be paid if the
SHIPMENT_DATE is later than one month from the PO_DATE. The penalty is $20 per day.
Evaluate the following two queries:
SQL> SELECT po_id, CASE
Correct Answer: C
QUIZ ~ 35 Which two statements are true regarding the USING and ON clauses in table joins?
(Choose two.)
A. Both USING and ON clauses can be used for equijoins and nonequijoins.
B. A maximum of one pair of columns can be joined between two tables using the ON clause.
C. The ON clause can be used to join tables on columns that have different names but compatible data
types.D. The WHERE clause can be used to apply additional conditions in SELECT statements containing
the ON or the USING clause.
Correct Answer: CD
QUIZ ~ 36
Examine the structure of the CUSTOMERS table.
Which two tasks would require subqueries or joins to be executed in a single statement? (Choose two.)
A. listing of customers who do not have a credit limit and were born before 1980
B. finding the number of customers, in each city, whose marital status is 'married'
C. finding the average credit limit of male customers residing in 'Tokyo' or 'Sydney'
D. listing of those customers whose credit limit is the same as the credit limit of customers residing in the
city'Tokyo'
E. finding the number of customers, in each city, whose credit limit is more than the average credit limit of
allthe customers
Correct Answer: DE
QUIZ ~ 37
Correct Answer: D
QUIZ ~ 38
Examine the structure of the PROMOTIONS table.
Each promotion has a duration of at least seven days .
Your manager has asked you to generate a report, which provides the weekly cost for each promotion done
Which query would achieve the required result?
Correct Answer: D
QUIZ ~ 39
You can add a row using SQL in a database with which of the
following?
A. ADD
B. CREATE
C. INSERT
D. MAKE
Correct Answer: C
QUIZ ~ 40
The command to remove rows from a table 'CUSTOMER' is:
Correct Answer: C
QUIZ ~ 41
The SQL WHERE clause:
QUIZ ~ 42
Which of the following is the original purpose of
SQL?
Correct Answer: D
QUIZ ~ 43
Correct Answer: A
QUIZ ~ 44
Correct Answer: A
QUIZ ~ 45
Correct Answer: B
QUIZ ~ 46
ON UPDATE CASCADE ensures which of the following?
A. Normalization
B. Data Integrity
C. Materialized Views
D. All of the above.
Correct Answer: B
QUIZ ~ 47
SQL data definition commands make up a(n) ________ .
A. DDL
B. DML
C. HTML
D. XML
Correct Answer: A
QUIZ ~ 48
Correct Answer: C
QUIZ ~ 49
A. LIKE only
B. IN only
C. NOT IN only
D. IN and NOT IN
Correct Answer: A
QUIZ ~ 50
Which of the following is the correct order of keywords for SQL SELECT
statements?
Correct Answer: A
QUIZ ~ 51
A. braces -- {...}.
B. CAPITAL LETTERS.
C. parenthesis -- (...) .
D. brackets -- [...].
Correct Answer: C
QUIZ ~ 52
A. report
B. form
C. file
D. table
Correct Answer: A
QUIZ ~ 53
Correct Answer: A
QUIZ ~ 54
In an SQL SELECT statement querying a single table, according to the SQL-92 standard the asterisk (*)
means that:
Correct Answer: A
QUIZ ~ 55
A. Acts like a WHERE clause but is used for groups rather than rows.
B. Acts like a WHERE clause but is used for rows rather than columns.
C. Acts like a WHERE clause but is used for columns rather than groups.
D. Acts EXACTLY like a WHERE clause.
Correct Answer: A
QUIZ ~ 56
Correct Answer: B
QUIZ ~ 57
To remove duplicate rows from the results of an SQL SELECT statement, the ________ qualifier specified
must be included.
A. ONLY
B. UNIQUE
C. DISTINCT
D. SINGLE
Correct Answer: C
QUIZ ~ 58
Correct Answer: C
QUIZ ~ 59
DROP TABLE table_name command inserts data into a table
A. TRUE
B. FALSE
Correct Answer: B
QUIZ ~ 60
A. SELECT
B. FROM
C. WHERE
D. GROUP BY
E. HAVING
Correct Answer: A
QUIZ ~ 61
Which clause specifies the tables or views from which to retrieve the
data?
A. SELECT
B. FROM
C. WHERE
D. GROUP BY
E. HAVING
Correct Answer: B
QUIZ ~ 62
A. SELECT
B. FROM
C. WHERE
D. GROUP BY
E. HAVING
Correct Answer: C
QUIZ ~ 63 When an aggregate function is used, which clause divides the data into
distinct groups?
A. SELECT
B. FROM
C. WHERE
D. GROUP BY
E. HAVING
Correct Answer: D
QUIZ ~ 64
A. /
B. \
C. *
D. &
Correct Answer: C
QUIZ ~ 65
What keyword is used to eliminate any duplicate
rows?
A. DISTINCT
B. WHERE
C. HAVING
D. FROM
Correct Answer: A
QUIZ ~ 66
A. GROUP BY
B. FROM
C. WHERE
D. ORDER BY
Correct Answer: D
QUIZ ~ 67
A. SUM B.
B. CAST
C. C. MOD
D. D. FLOOR
Correct Answer: B
QUIZ ~ 68
Combining two character items is known as ________.
A. Combining
B. Character modification
C. Concatenation
D. Casting
Correct Answer: C
QUIZ ~ 69
A. DISTINCT
B. AS
C. HAVING
D. IS
Correct Answer: B
QUIZ ~ 70
A. ZERO
B. EMPTY
C. NOTHING
D. NULL
Correct Answer: D
QUIZ ~ 71
What data type is used to store the quantity of time between two dates or
times?
A. DATETIME
B. INTERVAL
C. EXACT NUMERIC
D. APPROXIMATE NUMERIC
Correct Answer: B
QUIZ ~ 72
Which predicate tests whether the value of a given value expression matches an item in a given list of values?
A. Comparison
B. BETWEEN
C. IN
D. LIKE
E. IS NULL
Correct Answer: C
QUIZ ~ 73
Which predicate enables you to test whether a character string value expression matches a specified
character string pattern?
A. Comparison
B. BETWEEN
C. IN
D. LIKE
E. IS NULL
Correct Answer: D
QUIZ ~ 74
Which predicate lets you test whether the value of a given value expression falls within a specified range of
values?
A. Comparison
B. BETWEEN
C. IN
D. LIKE
E. IS NULL
Correct Answer: B
QUIZ ~ 75
Which operator is used to include rows in the result set that did not meet the condition of the
predicate?
A. IS
B. ANY
C. NOT
D. ALL
Correct Answer: C
QUIZ ~ 76
Which operator do you use when all the conditions you combine must be met in order for a row to be included
in a result set?
A. OR
B. AND C. NOT
D. ANY
E. ALL
Correct Answer: B
QUIZ ~ 77
Which operator do you use when either of the conditions you combine can be met in order for a row to be
included in a result set?
A. OR
B. AND C. NOT
D. ANY
E. ALL
Correct Answer: A
QUIZ ~ 78
IDENTIFY THE THREE (3) MAIN RELATIONSHIP TYPES THAT EXIST BETWEEN ANY TWO TABLES?
CHOOSE (3)
A. ONE TO ONE
B. ONE TO MANY
C. MANY TO MANY
D. ONE TO OTHER
E. MANY TO OTHERS
A. MANY TO OTHERS
B. ONE TO OTHER
C. MANY TO MANY
D. ONE TO MANY
E. ONE TO ONE
Correct Answer: E
QUIZ ~ 80
A SET OF RULES THAT HELP IMPROVE DATABASE DESIGN AND ALSO ENSURE AN OPTIMUM AND
EFFICIENT STRUCTURE FOR ANY DATABASE IS KNOWN AS.
A. ENTITY CLUSTER
B. REDUNDANCY
C. ENTITY SUPERTYPE
D. NORMALIZATION
E. CONSTRAINT
Correct Answer: D
QUIZ ~ 81
WHAT ARE THE TWO FORMS OF AUTHENTICATION IN SQL SERVER?
Correct Answer: B
QUIZ ~ 82
IDENTIFY THREE FILES SQL SERVER USES TO STORE ITS DATA
Correct Answer: B
QUIZ ~ 83
WHICH OF THESE STATEMENTS IS RESPONSIBLE FOR SEPARATING SECTIONS OF CODE?
A. INSERT
B. UPDATEC. CREATE
D. DELETE
E. GO
F. ALTER
Correct Answer: E
QUIZ ~ 84
IN SQL SERVER 2012, WHICH MODIFIER IS USED TO AUTO - GENERATE UNIQUE NUMBERS FOR A
COLUMN?
A. SEQUENCE
B. AUTONUMBER
C. SYNONYM
D. INDEX
E. IDENTITY
Correct Answer: E
QUIZ ~ 85
WHICH OF THESE DETERMINE THE WAY A COLUMN BEHAVES?
A. INDEX
B. CONSTRAINT
C. NORMALIZATION
D. CLUSTER
E. CASCADE
Correct Answer: B
QUIZ ~ 86
IN AN SQL SERVER DATAFILE, WHAT IS THE SMALLEST UNIT OF STORAGE?
A. AN EXTENT
B. A PAGE
C. A WORKSHEET
D. A PRIMARY FILE
E. A LOG FILE
Correct Answer: B
QUIZ ~ 87
A PLACE IN THE MEMORY THAT IS DECLARED BEFOREHAND AND GIVEN A NAME IS KNOWN AS:
A. AN ENTITY
B. AN ATTRIBUTE
C. A VARIABLE
D. A RECORD
E. AN INSTANCE
Correct Answer: C
QUIZ ~ 88
You need to ensure that tables are not dropped from your database. What should you
do?
A. Create a DDL trigger that contains COMMIT.
B. Create a DML trigger that contains COMMIT.
C. Create a DDL trigger that contains ROLLBACK.
D. Create a DML trigger that contains ROLLBACK.
Correct Answer: C
QUIZ ~ 89
You have the following two tables.
The foreign key relationship between these tables has CASCADE DELETE enabled.
You need to remove all records from the Orders table.
Which Transact-SQL statement should you use?
Correct Answer: B
QUIZ ~ 90
Correct Answer: B
QUIZ ~ 91
Study the T-SQL code below and answer the QUIZ ~ that follows :
SELECT DrugID, DrugName, Quantity
FROM DrugDetails.DrugInStock
WHERE DrugName LIKE '%pharma%';
What is the % in the select statement?
A. An operator
B. An operand
C. A predicate
D. A wildcard
Correct Answer: D
QUIZ ~ 92
Study the T-SQL code below and answer the QUIZ ~ that follows :
SELECT DrugID, DrugName, Quantity
FROM DrugDetails.DrugInStock
WHERE DrugName LIKE '%pharma%'; The WHERE clause of the select statement
restricts rows to the condition presented within.
A. True
B. False
Correct Answer: A
A. Commit
B. Rollback
C. Save
Correct Answer: A
A. Constraint
B. Triggers
C. Procedures
D. Roles
Correct Answer: A
QUIZ ~ 95
A column named ACCOUNTID has identity of seed value being 5 and an increment value being 1000.
What would be the ID of the 1st row in the column?
A. 5
B. 10
C. 1000
D. 1005
Correct Answer: A
QUIZ ~ 96
A column named ACCOUNTID has identity of seed value being 5 and an increment value being 1000.
What would be the ID of the 10th row in the column?
A. 8005
B. 5005
C. 9005
D. 10005
Correct Answer: C
QUIZ ~ 97
What would happen when the Transact-SQL code below is executed on a SQL Server instance?
DELETE from dbo.accounts
QUIZ ~ 98
Study the Transact-SQL code below and answer the QUIZ ~ that follows
SELECT city + ' ' + street + ' ' + state + ' ' + country
FROM dbo.accountdetails
WHERE accountholder LIKE "%tina";
What is the function of the + in the select statement?
A. Addition
B. Concatenation
C. Combinding
D. Compressing
Correct Answer: B
QUIZ ~ 99
Study the Transact-SQL code below and answer the QUIZ ~ that follows
SELECT city + ' ' + street + ' ' + state + ' ' + country Address
FROM dbo.accountdetails
WHERE accountholder LIKE "%tina";
How many columns would be retrieved after executing the code?
A. 2
B. 4
C. 1
D. 5
Correct Answer: C
QUIZ ~ 100
Study the Transact-SQL code below and answer the QUIZ ~ that follows
SELECT city + ' ' + street + ' ' + state + ' ' + country AS Address
FROM dbo.accountdetails
WHERE accountholder LIKE "%tina";
The name of the column that would be produced after executing the code is called a column alias.
A. True
B. False
Correct Answer: A
A. A permanent table
B. A system table C. A temporary table
D. None of the above
Correct Answer: C
QUIZ ~ 102
Reserved words can be used as database object names.
A. True
B. False
Correct Answer: B
A. True
B. False
Correct Answer: B
Correct Answer: D
A. SELECT list
B. An expression
C. WHERE clause
D. All the above
E. All but B
Correct Answer: E
QUIZ ~ 106 You can add a row using SQL in a database with which of
the following?
A. ADD
B. INSERT
C. CREATE
D. MAKE
Correct Answer: B
QUIZ ~ 107
A. INVERT
B. INSERT
C. UPDATE
D. SELECT
Correct Answer: A
QUIZ ~ 109 Which of the following SQL clauses is used to select data from 2 or
more tables?
A. WHERE
B. HAVING
C. JOIN
D. None of the above
Correct Answer: C
QUIZ ~ 110
The NULL in SQL keyword is used to
A. Represent 0 values.
B. Represent a missing or unknown value. NULL in SQL represents nothing.
C. Represent positive infinity.
D. Represent negative infinity.
Correct Answer: B
QUIZ ~ 111
A database can be said to be a container for objects that not only store data, but also enables data storage
and retrieval to operate in a secure and safe manner.
A. True
B. False
C. None of the above
Correct Answer: A
QUIZ ~ 112
Arranging data so that retrieval is as efficient as possible and at the same time reducing any duplication is
known as
A. Gathering
B. Normalizing
C. Sorting
D. None of the above
Correct Answer: C
QUIZ ~ 113 Query Editor sends queries to a database
using T-SQL.
A. True
B. False
C. None of the above
Correct Answer: A
Correct Answer: B
Correct Answer: C
QUIZ ~ 116 When SQL Server is installed more than once on a computer, each installation is
called an instance.
A. True
B. False
C. None of the above
Correct Answer: A
A. ALTER
B. INSERT
C. CREATE
D. DROP
Correct Answer: B
QUIZ ~ 118
Which system database contains the metadata about your database, logins, and configuration information
about the instance?
A. Tempdb
B. Master
C. Model
D. Msdb
Correct Answer: B
QUIZ ~ 119 Which of these databases is a temporary database whose lifetime is the duration of a SQL
Server session?
A. Master
B. Tempdb
C. AdventurerWorks
D. Model
Correct Answer: B
Correct Answer: A
QUIZ ~ 121 The __________ system database is used as a template for creating all
new databases
A. Master
B. TempDB
C. Model
D. MSDB
E. Pub
Correct Answer: C
QUIZ ~ 122
is the full form of SQL.
Correct Answer: C
QUIZ ~ 123
SQL Server 2005 NOT includes the following system database .
A. tempdb Database
B. Master Database
C. Model Database
D. sqldb Database
Correct Answer: D
QUIZ ~ 124
SQL Server stores index information in the system table.
A. sysindexes
B. systemindexes
C. sysind
D. sysindexes
Correct Answer: D
QUIZ ~ 125
is a read-only database that contains system objects that are included with SQL Server 2005.
A. Resource Database
B. Master Database
C. Model Database
D. msdb Database
Correct Answer: A
QUIZ ~ 126
The SQL Server services includes
Correct Answer: C
QUIZ ~ 127 . is a utility to capture a continuous record of server activity and provide
auditing capability.
Correct Answer: B
QUIZ ~ 128
The query used to remove all references for the pubs and newspubs databases from the system tables is
..
Correct Answer: A
QUIZ ~ 129
. clause specifies the groups into which output rows are to be placed and, if aggregate
functions are included in the SELECT clause.
A. ORDER BY
B. GROUP
C. GROUP BY
D. GROUP IN
Correct Answer: C
QUIZ ~ 130
are predefined and maintained SQL Server where users cannot assign or directly change the
values.
A. Local Variables
B. Global Variables
C. Assigned Variables
D. Direct Variables
Correct Answer: B
QUIZ ~ 131 Microsoft SQL Server NOT uses which of the following
operator category?
A. Bitwise Operator B.
Unary Operator
C. Logical Operator
D. Real Operator
Correct Answer: D
QUIZ ~ 132 Which of the following query is correct for using comparison
operators in SQL?
Correct Answer: B
QUIZ ~ 133 How to select all data from studentinfo table starting the name
from letter 'r'?
QUIZ ~ 134
Which of the following SQL query is correct for selecting the name of staffs from 'tblstaff' table where salary is
15,000 or 25,000?
Correct Answer: A
QUIZ ~ 135
The SELECT statement, that retrieves all the columns from empinfo table name starting with d to p is
..
Correct Answer: D
QUIZ ~ 136 Select a query that retrieves all of the unique countries from the
student table?
Correct Answer: A
QUIZ ~ 137
Which query is used for sorting data that retrieves all the fields from empinfo table and listed them in the
ascending order?
Correct Answer: A
QUIZ ~ 139 How to Delete records from studentinfo table with name of student
'Hari Prasad'?
A. DELETE FROM TABLE studentinfo WHERE sname='Hari Prasad';
B. DELETE FROM studentinfo WHERE sname='Hari Prasad';
C. DELETE FROM studentinfo WHERE COLUMN sname='Hari Prasad';
D. DELETE FROM studentinfo WHERE sname LIKE 'Hari Prasad';
Correct Answer: B
QUIZ ~ 140
Constraint checking can be disabled in existing . and .. constraints so that any data you
modify or add to the table is not checked against the constraint.
Correct Answer: A
QUIZ ~ 141
joins two or more tables based on a specified column value not equaling a specified column
value in another table.
A. OUTER JOIN
B. NATURAL JOIN
C. NON-EQUIJOIN
D. EQUIJOIN
Correct Answer: C
QUIZ ~ 142
is a procedural extension of Oracle - SQL that offers language constructs similar to those in
imperative programming languages.
A. SQL
B. PL/SQL
C. Advanced SQL
D. PQL
Correct Answer: B
QUIZ ~ 143
.. combines the data manipulating power of SQL with the data processing power of Procedural
languages.
A. PL/SQL
B. SQL
C. Advanced SQL
D. PQL
Correct Answer: A
QUIZ ~ 144
. has made PL/SQL code run faster without requiring any additional work on the part of the
programmer.
A. SQL Server
B. My SQL
C. Oracle
D. SQL Lite
Correct Answer: C
QUIZ ~ 145
A line of PL/SQL text contains groups of characters known as ..
A. Lexical Units
B. Literals
C. Textual Units
D. Identifiers
Correct Answer: A
QUIZ ~ 146
We use name PL/SQL program objects and units.
A. Lexical Units
B. Literals
C. Delimiters
D. Identifiers
Correct Answer: D
QUIZ ~ 147 A .. is an explicit numeric, character, string or Boolean value not represented
by an identifier.
A. Comments
B. Literals
C. Delimiters
D. Identifiers
Correct Answer: B
A. Strong
B. Weak
C. Empty
D. Anonymous
Correct Answer: D
QUIZ ~ 149
A. Integers literal
B. String literal
C. String units
D. String label
Correct Answer: B
QUIZ ~ 150
In . of Oracle, the database administrator creates a user account in the database for each
user who needs access.
A. Database Authentication
B. Operating System Authentication
C. Internal Authentication
D. External Authentication
Correct Answer: A
QUIZ ~ 151 In SQL, which command is used to remove a stored function from
the database?
A. REMOVE FUNCTION
B. DELETE FUNCTION
C. DROP FUNCTION
D. ERASE FUNCTION
Correct Answer: C
QUIZ ~ 152 In SQL, which command is used to select only one copy of each set of
duplicate rows
A. SELECT DISTINCT
B. SELECT UNIQUE
C. SELECT DIFFERENT
D. All of the above
Correct Answer: A
A. Values
B. Distinct values
C. Groups
D. Columns
Correct Answer: A
QUIZ ~ 154
Composite key is made up of .
A. One column
B. One super key
C. One foreign key
D. Two or more columns
Correct Answer: D
QUIZ ~ 155
What command is used to get back the privileges offered by the GRANT command?
A. Grant
B. Revoke
C. Execute
D. Run
Correct Answer: B
QUIZ ~ 156 Which command displays the SQL command in the SQL buffer, and
then executes it?
A. CMD
B. OPEN
C. EXECUTE
D. RUN
Correct Answer: D
A. Set of Extents
B. Set of Segments
C. Smallest Database storage unit
D. Set of blocks
Correct Answer: C
QUIZ ~ 158 If two groups are not linked in the data model editor, what is the hierarchy
between them?
Correct Answer: C
A. Instead of Trigger
B. DML Trigger
C. System Trigger
D. DDL Trigger
Correct Answer: C
Correct Answer: C
QUIZ ~ 161
In magnetic disk ________ stores information on a sector magnetically as reversals of the direction of
magnetization of the magnetic material.
A. Read-write head
B. Read-assemble head
C. Head-disk assemblies
D. Disk arm
Correct Answer: D
QUIZ ~ 162 A __________ is the smallest unit of information that can be read from or
written to the disk.
A. Track
B. Spindle
C. Sector
D. Platter
Correct Answer: C
QUIZ ~ 163
The disk platters mounted on a spindle and the heads mounted on a disk arm are together known as
___________.
A. Read-disk assemblies
B. Head-disk assemblies
C. Head-write assemblies
D. Read-read assemblies
Correct Answer: B
QUIZ ~ 164 The disk controller uses ________ at each sector to ensure that the data is not corrupted on
data retrieval.
A. Checksum
B. Unit drive
C. Read disk
D. Readsum
Correct Answer: A
A. Access time
B. Average seek time
C. Seek time
D. Rotational latency time
Correct Answer: B
QUIZ ~ 166
Once the head has reached the desired track, the time spent waiting for the sector to be accessed to appear
under the head is called the _______________.
A. Access time
B. Average seek time
C. Seek time
D. Rotational latency time
Correct Answer: D
QUIZ ~ 167
Hybrid disk drives are hard-disk systems that combine magnetic storage with a smaller amount of flash
memory, which is used as a cache for frequently accessed data.
A. Hybrid drivers
B. Disk drivers
C. Hybrid disk drivers
D. All of the mentioned
Correct Answer: B
QUIZ ~ 168
.
Name
Annie
Bob
Callie
Derek
Which of these query will display the table given above ?
Correct Answer: C
QUIZ ~ 169
Select ________ dept_name
from instructor;
Here which of the following displays the unique values of the column ?
A. All
B. From
C. Distinct
D. Name
Correct Answer: C
QUIZ ~ 170
The ______ clause allows us to select only those rows in the result relation of the ____ clause that satisfy a
specified predicate.
A. Where, from B.
From, select
C. Select, from
D. From, where
Correct Answer: A
QUIZ ~ 171
Select ID, name, dept name, salary * 1.1
where instructor;
The query given below will not give an error. Which one of the following has to be replaced to get the desired
output?
A. Salary*1.1
B. ID
C. Where
D. Instructor
Correct Answer: C
QUIZ ~ 172 The ________ clause is used to list the attributes desired in the
result of a query.
A. Where
B. Select
C. From
D. Distinct
Correct Answer: B
QUIZ ~ 173
Select name, course_id from
instructor, teaches where
instructor_ID= teaches_ID;
This Query can be replaced by which one of the following ?
Correct Answer: D
QUIZ ~ 174
Select * from employee where salary>10000 and dept_id=101;
Which of the following fields are displayed as output?
A. Salary, dept_id
B. Employee
C. Salary
D. All the field of employee relation
Correct Answer: D
QUIZ ~ 175
Employee_id Name Salary
1001 Annie 6000
1009 Ross 4500
1018 Zeith 7000
This is Employee table.
Select * from employee where employee_id>1009;
Which of the following employee_id will be displayed?
Correct Answer: D
Correct Answer: D
QUIZ ~ 177
Insert into employee _____ (1002,Joey,2000);
In the given query which of the keyword has to be inserted ?
A. Table
B. Values
C. Relation
D. Field
Correct Answer: B
QUIZ ~ 178 A _____ indicates an absent value that may exist but be unknown or that may
not exist at all.
A. Empty tuple
B. New value
C. Null value
D. Old value
Correct Answer: C
QUIZ ~ 179
The predicate in a where clause can involve Boolean operations such as and.The result of true and unknown
is_______, false and unknown is _____, while unknown and unknown is _____.
Correct Answer: D
Correct Answer: B
QUIZ ~ 181
In a employee table to include the attributes whose value always have some value which of the following
constraint must be used ?
A. Null
B. Not null
C. Unique
D. Distinct
Correct Answer: B
QUIZ ~ 182 Using the ______ clause retains only one copy of such
identical tuples.
A. Null
B. Unique
C. Not null
D. Distinct
Correct Answer: B
QUIZ ~ 183
Create table employee (id integer,name varchar(20),salary not null);
Insert into employee values (1005,Rach,0);
Insert into employee values (1007,Ross, );
Insert into employee values (1002,Joey,335);
Some of these insert statements will produce an error. Identify the statement.
Correct Answer: C
A. Unique
B. Not null
C. Both a and b
D. Either a or b
Correct Answer: C
QUIZ ~ 185
You attempt to query the database with this command: (25)
select nvl (100 / quantity, none)
from inventory;
Why does this statement cause an error when QUANTITY values are null?
Correct Answer: A
A. Xor
B. Or
C. And
D. Not
Correct Answer: D
QUIZ ~ 187
A relational database system needs to maintain data about the relations, such as the schema of the relations.
This is called
A. Metadata
B. Catalog
C. Log
D. Dictionary
Correct Answer: A
A. Child
B. Owner
C. Dominant
D. All of the mentioned
Correct Answer: A
A. On
B. Using
C. Set
D. Where
Correct Answer: A
Correct Answer: C
QUIZ ~ 191
Select *
from student join takes using (ID);
The above query is equivalent to
Correct Answer: A
QUIZ ~ 192 What type of join is needed when you wish to include rows that do not have
matching values?
A. Equi-join
B. Natural join
C. Outer join
D. All of the mentioned
Correct Answer: C
QUIZ ~ 193
How many tables may be included with a join?
A. One B.
Two
C. Three
D. All of the mentioned
Correct Answer: D
A. Cross join
B. Natural join
C. Join with USING clause
D. All of the mentioned
Correct Answer: D
A. 2
B. 3
C. 4
D. 5
Correct Answer: D
QUIZ ~ 196
Which join refers to join records from the right table that have no matching key in the left table are include in
the result set:
Correct Answer: B
A. Join
B. Selection
C. Union
D. Cross product
Correct Answer: A
Correct Answer: C
A. Key dependencies
B. Relation dependencies
C. Database dependencies
D. None of the mentioned
Correct Answer: A
QUIZ ~ 201 The space factor when determining the efficiency of algorithm is
measured by
Correct Answer: A
Correct Answer: A
Correct Answer: A
QUIZ ~ 204 The complexity of linear
search algorithm is
A. O(n)
B. O(log n)
C. O(n2)
D. O(n log n)
Correct Answer: B
A. O(n)
B. O(log )
C. O(n2)
D. O(n log n)
Correct Answer: C
A. O(n)
B. O(log n)
C. O(n2)
D. O(n log n)
Correct Answer: A
QUIZ ~ 207
A __________ is a special kind of a store procedure that executes in response to certain action on the table
like insertion, deletion or updation of data.
A. Procedures
B. Triggers
C. Functions
D. None of the mentioned
Correct Answer: C
A. Delete
B. Update
C. Views
D. All of the mentioned
Correct Answer: B
QUIZ ~ 209
The CREATE TRIGGER statement is used to create the trigger. THE _____ clause specifies the table name
on which the trigger is to be attached. The ______ specifies that this is an AFTER INSERT trigger.
A. for insert, on
B. On, for insert
C. For, insert
D. Both a and c
Correct Answer: C
Correct Answer: B
A. -
B. @
C. /
D. /@
Correct Answer: B
A. .txt
B. .pls
C. .ora
D. .sql
Correct Answer: B
A. BEFORE
B. DURING
C. AFTER
D. INSTEAD OF
Correct Answer: D
Correct Answer: B
A. Can be
B. Cannot be
C. Ought to be
D. Always
Correct Answer: A
A. : new only
B. : old only
C. Both :new and : old
D. Neither :new nor : old
Correct Answer: C
QUIZ ~ 217 Which normal form is considered adequate for normal relational
database design?
A. 2NF
B. 5NF
C. 4NF
D. 3NF
Correct Answer: D
Correct Answer: C
QUIZ ~ 219
A table has fields F1, F2, F3, F4, and F5, with the following functional dependencies:
F1->F3
F2->F4
(F1,F2)->F5 in terms of normalization,
this table is in
A. 1NF B.
2NF
C. 3NF
D. None of the mentioned
Correct Answer: A
Correct Answer: C
Correct Answer: D
A. mm/dd/yy
B. yyyy/mm/dd
C. dd/mm/yy
D. yy/dd/mm
Correct Answer: B
QUIZ ~ 223
An ________ on an attribute of a relation is a data structure that allows the database system to find those
tuples in the relation that have a specified value for that attribute efficiently, without scanning through all the
tuples of the relation.
A. Index
B. Reference
C. Assertion
D. Timestamp
Correct Answer: A
QUIZ ~ 224
Create index studentID_index on student(ID);
Here which one denotes the relation for which index is created ?
A. StudentID_index
B. ID
C. StudentID
D. Student
Correct Answer: D
A. Create datatype
B. Create data
C. Create definetype
D. Create type
Correct Answer: D
QUIZ ~ 226 Values of one type can be converted to another domain using which of
the following ?
A. Cast
B. Drop type
C. Alter type
D. Convert
Correct Answer: A
QUIZ ~ 227
Create domain YearlySalary numeric(8,2)
constraint salary value test __________;
In order to ensure that an instructor's salary domain allows only values greater than a specified value use:
A. Value>=30000.00
B. Not null;
C. Check(value >= 29000.00);
D. Check(value)
Correct Answer: C
Correct Answer: B
QUIZ ~ 229
In contemporary databases the top level of the hierarchy consists of ______, each of which can contain
_____.
A. Catalogs, schemas
B. Schemas, catalogs
C. Environment, schemas
D. Schemas, Environment
Correct Answer: A
QUIZ ~ 230 Which of the following statements creates a new table temp instructor that has the same schema
as instructor.
Correct Answer: B
A. Create table
B. Modify table
C. Alter table
D. Drop table
Correct Answer: C
A. Not null
B. Positive
C. Unique
D. Check 'predicate'
Correct Answer: B
QUIZ ~ 233 Foreign key is the one in which the ________ of one relation is referenced in
another relation.
A. Foreign key
B. Primary key
C. References
D. Check constraint
Correct Answer: B
QUIZ ~ 234
Create table course ( . . . foreign key (dept namE.references department . . . ); Which of the following is used
to delete the entries in the referenced table when the tuple is deleted in course table?
A. Delete
B. Delete cascade
C. Set null
D. All of the mentioned
Correct Answer: B
QUIZ ~ 235
Domain constraints, functional dependency and referential integrity are special forms of _________.
A. Foreign key
B. Primary key
C. Assertion
D. Referential constraint
Correct Answer: C
Correct Answer: A
Correct Answer: C
Correct Answer: C
QUIZ ~ 240
If a multivalued dependency holds and is not implied by the corresponding functional dependency, it usually
arises from one of the following sources.
A. A many-to-many relationship set
B. A multivalued attribute of an entity set
C. A one-to-many relationship set
D. Both a and b
Correct Answer: D
QUIZ ~ 241
Which of the following has each related entity set has its own schema and there is an additional schema for
the relationship set.
Correct Answer: A
QUIZ ~ 242
In which of the following , a separate schema is created consisting of that attribute and the primary key of the
entity set.
Correct Answer: B
QUIZ ~ 243
Suppose the user finds the usage of room number and phone number in a relational schema there is
confusion.This is reduced by
A. Unique-role assumption
B. Unique-key assignment
C. Role intergral assignment
D. None of the mentioned
Correct Answer: A
A. Relational-and B.
Concatenation
C. Dot representation
D. All of the above
Correct Answer: B
QUIZ ~ 245 Designers use which of the following to tune performance of systems to support time-
critical operations?
A. Denormalization
B. Redundant optimization
C. Optimization
D. Realization
Correct Answer: A
QUIZ ~ 246
In the schema (dept name, sizE.we have relations total inst 2007, total inst 2008 . Which dependency have
lead to this relation ?
Correct Answer: A
QUIZ ~ 247
Which one of the following is used to define the structure of the relation ,deleting relations and relating
schemas ?
Correct Answer: B
QUIZ ~ 248
Which one of the following provides the ability to query information from the database and to insert tuples into,
delete tuples from, and modify tuples in the database ?
Correct Answer: A
QUIZ ~ 249
Create table employee (name varchar ,id integer)
What type of statement is this ?
A. DML
B. DDL
C. View
D. Integrity constraint
Correct Answer: B
QUIZ ~ 250
Select * from employee
What type of statement is this?
A. DML
B. DDL
C. View
D. Integrity constraint
Correct Answer: A
QUIZ ~ 251 The basic data type char(n) is a _____ length character string and varchar(n) is _____
length character.
A. Fixed, equal
B. Equal, variable
C. Fixed, variable
D. Variable, equal
Correct Answer: C
QUIZ ~ 252
An attribute A of datatype varchar(20) has the value Avi . The attribute B of datatype char(20) has value
Reed .Here attribute A has ____ spaces and attribute B has ____ spaces .
A. 3, 20
B. 20, 4
C. 20 , 20
D. 3, 4
Correct Answer: A
QUIZ ~ 253
To remove a relation from an SQL database, we use the ______ command.
A. Delete
B. Purge
C. Remove
D. Drop table
Correct Answer: D
QUIZ ~ 254
Insert into instructor values (10211, 'Smith', 'Biology', 66000);
What type of statement is this ?
A. Query
B. DML
C. Relational
D. DDL
Correct Answer: B
QUIZ ~ 255 Updates that violate __________
are disallowed .
A. Integrity constraints
B. Transaction control
C. Authorization D. DDL constraints
Correct Answer: A
QUIZ ~ 256 Having clause is processed after the GROUP BY clause and any
aggregate functions.
A. True
B. False
Correct Answer: A
QUIZ ~ 257
In the context of MS SQL SERVER, with the exception of ............ column(s), any column can participate in the
GROUP BY clause.
A. bit
B. text
C. ntext
D. image
E. All of above
Correct Answer: E
QUIZ ~ 258 The sequence of the columns in a GROUP BY clause has no effect in the ordering
of the output.
A. True
B. False
Correct Answer: B
QUIZ ~ 259 GROUP BY ALL generates all possible groups - even those that do not meet the query's
search criteria.
A. True
B. False
Correct Answer: A
A. Distinct
B. Count (*)
C. Average()
D. None of above
Correct Answer: B
QUIZ ~ 261 Using GROUP BY ............ has the effect of removing duplicates
from the data.
A. with aggregates
B. with order by C. without order by
D. without aggregates
Correct Answer: D
QUIZ ~ 262
Below query is run in SQL Server 2012, is this query valid or
invalid: Select count(*) as X from Table_Name Group by ()
A. Valid
B. Invalid
Correct Answer: A
QUIZ ~ 263
For the purposes of ............, null values are considered equal to other nulls and are grouped together into a
single result row.
A. Having
B. Group By
C. Both of above
D. None of above
Correct Answer: B
QUIZ ~ 264 If you SELECT attributes and use an aggregate function, you must GROUP BY the non-
aggregate attributes.
A. True
B. False
Correct Answer: A
QUIZ ~ 265
GRANT ALTER ON SERVER ROLE::Production TO Jim ;
A. The above example allows Jim to add other permissions to the user-defined server role named Production.
B. The above example allows Jim to add other roles to the user-defined server role named Production.
C. The above example allows Jim to add other logins to the user-defined server role named Production.
D. None of above.
Correct Answer: C
QUIZ ~ 266
The CONTROL SERVER and ALTER ANY SERVER ROLE permissions are sufficient to execute ALTER
SERVER ROLE for a fixed server role.
A. True
B. False
Correct Answer: B
QUIZ ~ 267
Permissions at the schema level can be granted and users the automatically inherit permissions on new
objects created in the schema.
A. True
B. False
Correct Answer: A
QUIZ ~ 268
DENY revokes a permission so that it cannot be inherited. DENY takes precedence over all permissions,
except DENY does not apply to .......
Correct Answer: BC
QUIZ ~ 269
Roles can be nested; Permission sets that are assigned to roles are inherited by ........ members of the role.
A. elected
B. restricted
C. admin
D. all
Correct Answer: D
QUIZ ~ 270 Members of the sysadmin fixed server role and object owners cannot be
denied permissions.
A. True
B. False
Correct Answer: A
QUIZ ~ 271
The permissions granted to logins and user-defined fixed server roles can be examined by using the .......
view.
A. sys.credentials
B. sys.server_role_members
C. sys.server_permissions
D. None of above
Correct Answer: C
QUIZ ~ 272
Users with the ........ permission can create new user-defined database roles to represent groups of users with
common permissions.
A. CREATE CERTIFICATE
B. CREATE CONTRACT
C. CREATE LOGIN
D. CREATE ROLE
Correct Answer: D
QUIZ ~ 273 In SQL Server 2012, the merge join does not need any
equijoin predicate.
A. True
B. False
Correct Answer: B
A. many-to-one
B. many-to-many
C. one-to-one
D. one-to-many
Correct Answer: BD
QUIZ ~ 275 Inputs to the merge join may or may not be sorted on
the join keys.
A. True
B. False
Correct Answer: B
QUIZ ~ 276
With a merge join each table is read at most once, and the total cost is proportional to the . . . . . of the number
of rows in the inputs. Thus, merge join is often a better choice for larger inputs.
A. proportion
B. product
C. sum
D. none of above
Correct Answer: C
A. True
B. False
Correct Answer: A
QUIZ ~ 278
SQL Server can get sorted inputs for a merge join in two ways: It can explicitly sort the inputs using a sort
operator or it can read the rows from an index. In general, a plan using an index to achieve sort order is . . . . .
. than a plan using an explicit sort.
A. cheaper
B. costlier
C. sometimes cheaper and sometimes costlier
D. none of above
Correct Answer: A
QUIZ ~ 279
A merge join necessarily need to scan every row from both inputs. As soon as it reaches the end of either
input, the merge join stops scanning.
A. True
B. False
Correct Answer: B
QUIZ ~ 280
Merge join supports multiple equijoin predicates as long as the inputs are sorted on . . . . . . the join keys.
A. some of
B. one of
C. all
D. none of above
Correct Answer: C
QUIZ ~ 281
Merge join supports a special case where in some cases, the optimiser generates a merge join for a full outer
join, even without an equijoin predicate.
A. True
B. False
Correct Answer: A
QUIZ ~ 282 Merge join itself is generally slow, but it can be an expensive choice if sort operations
are required.
A. True
B. False
Correct Answer: B
A. sorted
B. unsorted
Correct Answer: B
QUIZ ~ 284 Hash joins are used for many types of set-matching operations
such as . . . . .
A. intersection
B. inner join
C. left, right, and full outer join
D. both A & B
E. all of above
Correct Answer: E
QUIZ ~ 285
When an in-memory hash join is not possible, the Hash Warning is fired. The idea behind this event is that
grace hash join and recursive hash joins are . . . . efficient and that the DBA should be aware of this.
A. more
B. equally
C. less
D. none of above
Correct Answer: C
A. True
B. False
Correct Answer: A
QUIZ ~ 287 The term . . . . is sometimes used to describe grace hash joins or
recursive hash joins.
A. Spill bailout
B. Join bailout
C. Spill Warning bailout
D. Hash bailout
Correct Answer: D
Correct Answer: C
QUIZ ~ 289
It is not always possible during optimization to determine which hash join is used. Therefore, SQL Server
starts by using an in-memory hash join and gradually transitions to grace hash join, and recursive hash join,
depending on the size of the build input.
A. True
B. False
Correct Answer: A
QUIZ ~ 290 A . . . . . . is a join method that used elements of both a simple in-memory hash
and grace hash.
A. combined join
B. hybrid join
C. team join
Correct Answer: B
QUIZ ~ 291
A columnstore index is a technology for storing, retrieving and managing data by using a columnar data
format, called a . . . . . . .
A. column segment
B. deltastore
C. columnstore
D. columnar
Correct Answer: C
QUIZ ~ 292
As an example, if a table has 50 columns and the query only uses 5 of those columns, the columnstore index
only fetches the . . . . . columns from disk. It skips reading in the other . . . . . . columns.
A. 5, 45
B. 45, 5
C. 10, 40
D. 40, 10
Correct Answer: A
QUIZ ~ 293
A nonclustered columnstore index and a clustered columnstore index function the same. The difference is a
nonclustered index is a secondary index created on a . . . . . . . table, whereas a clustered columnstore index is
the primary storage for the . . . . . . . table.
A. columnstore, entire
B. rowstore, entire
C. rowstore, columnstore
D. columnstore, rowstore
Correct Answer: B
QUIZ ~ 294
Columnstore indexes read compressed data from disk, which means fewer bytes of data need to be read into
memory.
A. True
B. False
Correct Answer: A
QUIZ ~ 295
A. for analytic queries that scan large amounts of data, especially on large tables
B. for queries on a small range of values
C. in case of fact tables, since they tend to require full table scans rather than table seeks
D. Both A & C
Correct Answer: D
QUIZ ~ 296
Clustered columnstore indexes collect up to 1,048,576 rows in deltastore before compressing them into the
compressed rowgroup. Once the rowgroup contains 1,048,576 rows, the delta rowgroup is marked closed
....
A. but it is still available for queries and update/delete operations but the newly inserted rows go into
anexisting or newly created deltastore rowgroup.
B. and is not available for queries and update/delete operations. The newly inserted rows go into an existing
ornewly created deltastore rowgroup.
C. and is not available for queries and update/delete operations. The new rows cannot be inserted.
D. but it is still available for queries and update/delete operations but the new rows cannot be inserted.
Correct Answer: A
QUIZ ~ 297 The memory required for creating a columnstore index depends
on the . . . . . . .
A. number of columns
B. number of string columns
C. DOP
D. Both A & B
E. All of above
Correct Answer: A
QUIZ ~ 298
If your table has fewer than one million rows, SQL Server will use only one thread to create the columnstore
index.
A. True
B. False
Correct Answer: A
QUIZ ~ 299 By design, a columnstore table . . . . . . . a primary
key constraint.
A. allows
B. does not allow
Correct Answer: B
QUIZ ~ 300
Because data in a columnstore index is grouped by columns, rather than by rows, data can be compressed as
efficiently as with rowstore indexes.
A. True
B. False
Correct Answer: B
QUIZ ~ 301
Below statement is true or false:
In order to execute INSERT statements, a user must have at least the INSERT permission assigned on the
target table.
A. True
B. False
Correct Answer: A
A. nullable columns
B. IDENTITY columns
C. columns with the timestamp data type
D. columns with a default value
E. All of above
F. None of above
Correct Answer: E
Correct Answer: BC
QUIZ ~ 304
In SQL Server, you use the INSERT statement to add one new row and not multiple new rows to an existing
table.
A. True
B. False
Correct Answer: B
QUIZ ~ 305
You can insert data into a table from the results of the EXECUTE statement.
A. True
B. False
Correct Answer: A
A. particular column
B. all columns
C. IDENTITY columns
D. All of above
E. None of above
Correct Answer: D
QUIZ ~ 307 SQL Server supports several methods for inserting data into tables
including ........
A. SELECT INTO
B. BULK SELECT INSERT
C. INSERT SELECT
D. INSERT SELECT FROM OPENROWSET(BULK )
QUIZ ~ 308
INSERT INTO Persons VALUES ('xxx1','yyy1'), VALUES ('xxx2','yyy2'),
Values ('xxx3','yyy3');
A. only 1 is correct
B. only 2 is correct
C. Both are correctD. None is correct
Correct Answer: A
QUIZ ~ 309
Tick the statements which are true.
It is always a good idea to provide a full-column list for INSERT statement because if the full-column list is not
specified then
Correct Answer: BD
QUIZ ~ 310
If during Insert you want to specify the number or percent of random rows that will be inserted then you can
use the . . . . . expression.
A. TYPE
B. NUMBER
C. TOP
D. PERCENT
Correct Answer: C
Correct Answer: B
QUIZ ~ 312
You cannot reference .............. clause in a select statement for a CTE unless the statement also includes a
TOP clause.
A. Update
B. Where
C. an ORDER BY
D. DISTINCT
Correct Answer: C
QUIZ ~ 313 If you need to reference/join the same data set multiple times, then CTE is
not the choice.
A. True
B. False
Correct Answer: B
QUIZ ~ 314
You can use a CTE within a CREATE VIEW statement.
A. True
B. False
Correct Answer: A
QUIZ ~ 315 SELECT statements within recursive CTEs cannot contain which of
the following:
Correct Answer: D
QUIZ ~ 316
CTEs are unindexable but on the other hand CTEs can use existing indexes on referenced objects.
A. True
B. False
Correct Answer: A
QUIZ ~ 317
CTE is different from view in a way that CTE is not created as .............. in the database and therefore is only
available for this single statement.
A. Table
B. Link
C. Procedure
D. an object
Correct Answer: D
QUIZ ~ 318 CTEs rely on stats of the ................... as CTEs do not have dedicated
stats of their own.
A. system Tables
B. static views
C. underlying objects
D. None of above
Correct Answer: C
A. True
B. False
Correct Answer: B
QUIZ ~ 320
Which logical method can be used in SQL Server 2012 to returns an item from the specified index in a list of
values?
A. SELECT
B. SELECTION
C. CHOOSE
D. None of the above
Correct Answer: C
Correct Answer: C
Correct Answer: A
QUIZ ~ 324
Is there any function in SQL server which can be used to check whether value can be Casted or not? If yes,
name it.
A. No there is no method
B. Try_Cast
C. CAST
D. None of the above
Correct Answer: B
QUIZ ~ 326
Which function in SQL server is used in query to find the count of the items in the concerned object (i.e. table,
view, etc.)?
A. COUNTER
B. COUNT
C. DETECT
D. None of the above
Correct Answer: B
A. True
B. False
Correct Answer: B
A. Create Index
B. Create Fulltext Index
C. Special System Stored Procedures
D. Both b & c
Correct Answer: D
QUIZ ~ 329
A ................ index is one which satisfies all requested columns in a query without performing a further lookup
into the clustered index.
A. Clustered
B. Non-Clustered
C. Covering
D. B-tree
Correct Answer: C
A. True
B. False
Correct Answer: A
QUIZ ~ 331
While creating an index on a column(s) in MS SQL Server you can specify that the index on each column be
either ascending or descending and this affects the performance.
A. True
B. False
Correct Answer: A
QUIZ ~ 332
In a ..................., the first row added to the indexis the first record in the table, the second row is the second
record in the table and so on.
A. Clustered
B. Non-Clustered
C. Heap
D. CharIndex
Correct Answer: C
QUIZ ~ 333
In ........... index, instead of storing all of the columns for a record together, each column is stored separately
with all of the other rows in an index.
A. Clustered
B. Column Store
C. Non-Clustered
D. Row Store
Correct Answer: B
QUIZ ~ 334 Without primary key, the creation of spatial index will
not succeed.
A. True
B. False
Correct Answer: A
A. disabling
B. dropping
C. altering
D. Both a & b
Correct Answer: A
A. True
B. False
Correct Answer: B
QUIZ ~ 337 You can instruct SQL Server to use a specific JOIN type by
using the . . . . .
A. Query hints
B. Join hints
C. Table hints
D. All of above
Correct Answer: B
A. Remote join
B. Hash Join
C. Loop Join
D. Merge Join
Correct Answer: C
QUIZ ~ 339 The . . . . . hint dictates that the join operation is performed on the server hosting
the right table.
A. Remote join
B. Hash Join
C. Loop Join
D. Merge Join
Correct Answer: A
QUIZ ~ 340
For simple queries affecting a small result set, the loop join generally provides better performance than a hash
or merge join.
A. True
B. False
Correct Answer: A
QUIZ ~ 341
You cannot specify join hints when you use the ANSI-style join syntax - that is, when you actually use the
keyword JOIN in the query.
A. True
B. False
Correct Answer: B
QUIZ ~ 342
It is possible to specify more than one join type in the query hint and allow SQL Server to choose the
leastexpensive one.
A. True
B. False
Correct Answer: A
A. query, join B.
join, query
Correct Answer: B
QUIZ ~ 344
The Remote join, that is used when dealing with data from a remote server has serious affects on execution
plans.
A. True
B.
False
Correct Answer: B
QUIZ ~ 345 Use a REMOTE join hint only when the . . . . table has fewer rows than
the . . . . table.
A. left, right
B. right, left
Correct Answer: A
QUIZ ~ 346 . . . . . specifies that the join order indicated by the query syntax is preserved during
query optimization.
A. KEEP PLAN
B. MAX_GRANT_PERCENT
C. FORCE ORDER
D. EXPAND VIEWS
Correct Answer: C
QUIZ ~ 347
An ORDER BY can be used in a subquery.
A. True
B. False
Correct Answer: B
QUIZ ~ 348
The subquery is known as a ................. subquery because the subquery is related to the outer SQL
statement.
A. Relational
B. Related
C. Correlated
D. Corelational
Correct Answer: C
QUIZ ~ 349 A subquery can itself include one or more subqueries. .............. subqueries can be nested
in a statement.
A. 16
B. 32
C. 64
D. Any number of
Correct Answer: D
QUIZ ~ 350
B.
In case of correlated subquery the outer query is executed once. The subquery is executed ............. for every
row in the outer query.
A. Once
Twice
C. Thrice
D. Both A & B
Correct Answer: A
QUIZ ~ 351
The SELECT query of a subquery is always enclosed in parentheses and may only include an ORDER BY
clause only when a TOP clause is also specified.
A. True
B. False
Correct Answer: A
A. Valid
B. Invalid
Correct Answer: A
A. True
B. False
Correct Answer: B
SELECT a.EmployeeID
FROM HumanResources.Employee a
WHERE a.ContactID IN
(
SELECT b.ContactID
FROM Person.Contact b
WHERE b.Title = 'Mrs.'
)
GO
A. Correlated Subquery
B. Noncorrelated Subquery
B.
Correct Answer: B
QUIZ ~ 355
If a table appears only in a subquery and not in the outer query, then columns from that table can be included
in the output.
A. True
False
Correct Answer: B
A. True
B. False
Correct Answer: A
Correct Answer: B
QUIZ ~ 358 #table refers to a local temporary table and is visible to only the user
who created it.
A. True
B. False
Correct Answer: A
QUIZ ~ 359 Which command to use in order to delete the data inside the table, and not
the table itself
A. DELETE
B. TRUNCATE
C. Both TRUNCATE & DELETE
D. DROP
Correct Answer: B
A. True
B. False
B.
Correct Answer: B
A. table variables
B. persistent temporary tables
C. local temporary tables
D. global temporary table
Correct Answer: D
QUIZ ~ 362
Delete table and Drop table are not the same though. The ......... will delete all data from the table whilst the
....... will remove the table from the database.
A. Drop,Delete
B. Delete, Drop
Correct Answer: B
QUIZ ~ 363
Below Query shows:
USE DBName
GO
SELECT *
FROM sys.Tables
GO
Correct Answer: C
QUIZ ~ 364
sp_tables returns only the views in the database.
A. True
B. False
Correct Answer: B
A. sp_configure
B. sp_modify
C. sp_allow_updates
D. Both A & B
Correct Answer: A
QUIZ ~ 366
......... and ......... system tables maintain entries containing object definitions and other tracking information for
each object.
A. sysobjects
B. syscomments
C. systrack
D. Both A & B
Correct Answer: D
Correct Answer: B
QUIZ ~ 368 Which clause in DELETE statement leads to perform delete with
certain criteria?
A. Group
B. Group By
C. Where
D. Having
Correct Answer: C
A. True
B. False
Correct Answer: A
A. DDL
B. DML
C. TCLD. BPL
Correct Answer: B
A. True
B. False
Correct Answer: A
Correct Answer: C
QUIZ ~ 373
If a column in a table is set to an Identity and if user deletes the row from the table with the help of Delete
statement. Will this resets Identity value for the table?
Correct Answer: C
Correct Answer: A
A. Yes
B. No
Correct Answer: A
A. DDL
B. DML
C. TCLD. BPL
Correct Answer: A
A. True
B. False
Correct Answer: A
Correct Answer: D
A. True
B. False
Correct Answer: B
A. Truncate
B. Delete
C. Remove
D. None of the above
Correct Answer: A
Correct Answer: C
Correct Answer: B
A. Both
B. Only Row
C. Table
D. None of the above
Correct Answer: C
QUIZ ~ 384
Can Truncate be used in Views?
A. True
B. False
Correct Answer: B
A. It will delete the rows from both the tables (child as well as parent)
B. It will not delete even if CASCADE ON DELETE option is given with parent table
C. It will delete even if CASCADE ON DELETE option is given with parent table
D. All are true
Correct Answer: B
QUIZ ~ 386 TRUNCATE can't be used if you have Replication/ CDC enabled for the
table, is it true?
A. True
B. False
Correct Answer: A
A. From
B. SELECT
C. Order By
D. Where
Correct Answer: C
A. True
B. False
Correct Answer: B
QUIZ ~ 389 Refer below query which leads to create a view named
vwEmployee.
Correct Answer: B
QUIZ ~ 390
A view always fetch up to date data from the table because it runs it's query each time it receives a call, is
this statement correct?
A. True
B. False
Correct Answer: A
A. True
B. False
Correct Answer: A
QUIZ ~ 392
How can you drop more than one View in single command?
Correct Answer: D
QUIZ ~ 393 What is true about views among all the given
below statements:
Correct Answer: C
A. Yes
B. No
Correct Answer: A
QUIZ ~ 395 Views are
also called as:
A. Complex tables
B. Simple tables
C. Virtual tables
D. Actual Tables
Correct Answer: C
A. Yes
B. No
Correct Answer: A
A. Primary
B. Foreign
C. Alternate
D. Secondary
Correct Answer: D
A. True
B. False
Correct Answer: B
Correct Answer: D
A. True
B. False
Correct Answer: A
QUIZ ~ 401
What is true about Unique and primary key?
A. Unique can have multiple NULL values but Primary can't have.
B. Unique can have single NULL value but Primary can't have even single.
C. Both can have duplicate values
D. None of the above
Correct Answer: B
A. True
B. False
Correct Answer: A
A. Foreign Key
B. Unique Key
C. Primary Key
D. None of the above
Correct Answer: C
A. Foreign Key
B. Unique Key
C. Primary Key
D. None of the above
Correct Answer: A
A. True
B. False
Correct Answer: B
QUIZ ~ 406 . While using the IN operator, the SQL engine will scan all records fetched from
the inner query.
A. True
B. False
Correct Answer: A
Table tab_1:
ID Column_2 Name
11 F1 Fardeen
22 G1 Gautam
33 H1 Harish
44 I1 Fardeen
55 E1 Eklavya
NULL NULL NULL
0 0 0
A. ID Column_2 Name
0 0 0
B. ID Column_2 NameNULL NULL NULL
C. ID Column_2 Name
11 F1 Fardeen
22 G1 Gautam
33 H1 Harish
44 I1 Fardeen
55 E1 Eklavya
NULL NULL NULL
0 0 0
D. None of above
Correct Answer: C
QUIZ ~ 408
. The select list of a subquery introduced by EXISTS almost always consists of . There is no reason to
list column names as you are just verifying whether rows that meet the conditions specified in the subquery
exist.
A. percent (%)
B. asterisk (*)
C. Comma (,)
D. None of above
Correct Answer: B
A. True
B. False
Correct Answer: B
QUIZ ~ 410 When EXISTS is used, SQL Server stops as soon as it finds .......... record that
matches the criteria.
A. Middle
B. LastC. One
D. None of above
Correct Answer: C
QUIZ ~ 411
NOT EXISTS works like EXISTS, except the WHERE clause in which it is used is satisfied if ........... rows are
returned by the subquery.
A. Two
B. Unpinned
C. TOP
D. No
Correct Answer: D
A. constant
B. column name
C. other expression
D. All of above
Correct Answer: D
Table dbo.tab_1
ID Column_2 Name
11 F1 Fardeen
22 G1 Gautam
33 H1 Harish
44 I1 Fardeen
55 E1 Eklavya
SELECT *
FROM Tab_1 WHERE ','+@InList+',' LIKE ',%'+CAST(Id
AS varchar)+',%'
A. ID Column_2 Name
11 F1 Fardeen
33 H1 Harish
44 I1 Fardeen
B. ID Column_2 Name
11 F1 Fardeen
22 G1 Gautam
33 H1 Harish
44 I1 Fardeen
C. ID Column_2 Name
11 F1 Fardeen22 G1 Gautam 33 H1 Harish
44 I1 Fardeen
55 E1 Eklavya
D. None of above
Correct Answer: A
Table tab_1
ID Column_2 Name
11 F1 Fardeen
22 G1 Gautam
33 H1 Harish
44 I1 Fardeen
55 E1 Eklavya
NULL NULL NULL
A. ID Column_2 Name
11 F1 Fardeen
22 G1 Gautam
33 H1 Harish
44 I1 Fardeen
55 E1 Eklavya
B. It will show an error message.
C. ID Column_2 NameNULL NULL NULL
D. ID Column_2 Name
11 F1 Fardeen
22 G1 Gautam
33 H1 Harish
44 I1 Fardeen
55 E1 Eklavya
NULL NULL NULL
Correct Answer: D
QUIZ ~ 415 Exists uses a ............ to join values from a column to a column within
the subquery.
A. View
B. Join
C. Subquery
D. Clustered Index
Correct Answer: B
QUIZ ~ 416
Which one is correct syntax for Insert Statement?
A. Insert table_name Columns(Col1, Col2,Col3);
B. Insert into table_name (Col1, Col2,Col3) VALUES (Val1,Val2,Val3);
C. Insert Columns(Col1, Col2,Col3) VALUE (Val1, Val2,Val3) Into table_name;
D. None of the above
Correct Answer: B
QUIZ ~ 417 Can the sequence & number of columns and values be different in an
Insert statement?
A. True
B. False
Correct Answer: B
Correct Answer: C
A. True
B. False
Correct Answer: A
Correct Answer: B
Correct Answer: A
QUIZ ~ 422
A. True
B. False
C. It is replacement of update
D. None of the above
Correct Answer: B
A. True
B. False
Correct Answer: B
Correct Answer: C
Correct Answer: A
A. True
B. False
Correct Answer: B
QUIZ ~ 427 What is the purpose of Order By Clause in
SQL server?
Correct Answer: A
A. True
B. False
Correct Answer: B
QUIZ ~ 429 What needs to be added when user want to show results by
Descending Order?
Correct Answer: B
A. Descending
B. Ascending
C. Random
D. None of the above
Correct Answer: B
Correct Answer: E
Correct Answer: A
A. True
B. False
Correct Answer: A
QUIZ ~ 434
What does UNION operator do in a SQL Server statement?
Correct Answer: D
Correct Answer: B
QUIZ ~ 436 How can we get all records (redundant as well as non-redundant) from
union operator?
Correct Answer: A
QUIZ ~ 437
The column names in the result of a UNION (of tables) are always equal to the column names in the 1st
SELECT statement with the UNION operator, true or false?
A. True
B. False
Correct Answer: A
QUIZ ~ 438
Is UNION or UNION ALL operator valid for LONG data type column?
A. True
B. False
Correct Answer: B
QUIZ ~ 439
Can we use UNION operator in SELECT statement which contains TABLE collection expressions?
A. True
B. False
Correct Answer: B
A. True
B. False
Correct Answer: A
Correct Answer: B
QUIZ ~ 442 The result set will have Column names from the first
query, correct?
A. True
B. False
Correct Answer: A
QUIZ ~ 443
If we know the records returned by our query are unique then which operator will be preferred out of UNION
or UNION ALL?
A. Union
B. Union ALL
Correct Answer: B
A. Left Join
B. Left Outer Join
C. Right Outer JoinD. Cross Join
Correct Answer: D
QUIZ ~ 445
Are FULL Outer Join and Cross Join Same?
A. False
B. True
Correct Answer: B
QUIZ ~ 446
The JOIN which returns all the records from the right table in conjunction with the matching records from the
left table and if there are no matching values in the left table, it returns NULL. Which is this JOIN?
A. Right JOIN
B. CROSS JOIN
C. LEFT Join
D. Full OUTER JOIN
Correct Answer: A
A. OUTER Joins
B. INNER joins
Correct Answer: B
QUIZ ~ 448
What is true about NOT INNER JOIN?
Correct Answer: C
QUIZ ~ 449
What is the other name of INNER JOIN?
A. Equi Join
B. In Join
C. Out Join
D. All of the above
Correct Answer: A
QUIZ ~ 450 List the types
of Inner join?
Correct Answer: C
A. Equi.
B. Natural
C. Cross
D. Outer
Correct Answer: B
QUIZ ~ 452
Which join refers to join records from the right table that have no matching key in the left table are include in
the result set:
Correct Answer: B
QUIZ ~ 453
A __________ is a special kind of a stored procedure that executes in response to certain action on the table
like insertion, deletion or updation of data.
A. Procedures
B. Triggers
C. Functions
D. None of the mentioned
Correct Answer: B