Vous êtes sur la page 1sur 93

QUIZ ~ 1

Which of the following is a valid SQL Data


type?

A. DATE
B. NUMERIC
C. FLOAT
D. All of the above

Correct Answer: D

QUIZ ~ 2

The full form of DDL is?

A. Dynamic Data Language


B. Detailed Data Language
C. Data Definition Language
D. Data Derivation Language

Correct Answer: C

QUIZ ~ 3

Which of the following is a legal expression in


SQL?

A. SELECT NULL FROM EMPLOYEE;


B. SELECT NAME FROM EMPLOYEE;
C. SELECT NAME FROM EMPLOYEE WHERE SALARY = NULL;
D. None of the above

Correct Answer: B

QUIZ ~ 4

Which of the following is a comparison operator in


SQL?

A. =
B. LIKE
C. BETWEEN
D. All of the above

Correct Answer: D

QUIZ ~ 5

Which of the following database object does not physically


exist?

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

Which one of the following is not true for a


view:

A. View is derived from other tables.


B. View is a virtual table.
C. A view definition is permanently stored as part of the database.
D. View never contains derived columns.

Correct Answer: C

QUIZ ~ 8

To delete a particular column in a relation the command used


is:

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?

A. WHERE prod_id LIKE '%_D123%' ESCAPE '_' B.


WHERE prod_id LIKE '%\_D123%' ESCAPE '\'
C. WHERE prod_id LIKE '%_D123%' ESCAPE '%_'
D. WHERE prod_id LIKE '%\_D123%' ESCAPE '\_'

Correct Answer: B

QUIZ ~ 13 Which two statements are true regarding single row functions?
(Choose two.)

A. They accept only a single argument.


B. They can be nested only to two levels.
C. Arguments can only be column values or constants.
D. They always return a single result row for every row of a queried table.
E. They c an return a data type value different from the one that is referenced.

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;

Correct Answer: ADE

QUIZ ~ 15 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

WHEN MONTHS_BETWEEN (shipment_date,po_date)>1 THEN

TO_CHAR((shipment_date - po_datE.* 20) ELSE 'No Penalty' END PENALTY

FROM shipments;

SQL>SELECT po_id, DECODE


(MONTHS_BETWEEN (po_date,shipment_date)>1,

TO_CHAR((shipment_date - po_datE.* 20), 'No Penalty') PENALTY


FROM shipments;

Which statement is true regarding the above commands?

A. Both execute successfully and give correct results.


B. Only the first query executes successfully but gives a wrong result.
C. Only the first query executes successfully and gives the correct result.
D. Only the second query executes successfully but gives a wrong result.
E. Only the second query executes successfully and gives the correct result.

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

Which statement is true regarding the INTERSECT


operator?

A. It ignores NULL values.


B. Reversing the order of the intersected tables alters the result.
C. The names of columns in all SELECT statements must be identical.
D. The number of columns and data types must be identical for all SELECT statements in the query.

Correct Answer: D

QUIZ ~ 18

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?

A. SELECT promo_name, promo_cost/promo_end_date-promo_begin_date/7 FROM promotions;


B. SELECT promo_name,(promo_cost/promo_end_date-promo_begin_date)/7 FROM promotions
C. SELECT promo_name, promo_cost/(promo_end_date-promo_begin_date/7) FROM promotions;
D. SELECT promo_name, promo_cost/((promo_end_date-promo_begin_date)/7) FROM promotions;

Correct Answer: D

QUIZ ~ 19
Examine the structure of the PRODUCTS
table.

All products have a list price.

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.

SQL>SELECT prod_name, prod_list_price-(prod_list_price*(25/100))

+(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?

A. It produces a syntax error.


B. The result remains unchanged.
C. The total price value would be lower than the correct value.
D. The total price value would be higher than the correct value.

Correct Answer: B

QUIZ ~ 20

The following are components of a database except ________ .

A. user data B.
metadata
C. reports
D. indexes

Correct Answer: C

QUIZ ~ 21

An on-line commercial site such as Amazon.com is an example of a(n) ________


.

A. single-user database application


B. multiuser database application
C. e-commerce database application
D. data mining database application

Correct Answer: C

QUIZ ~ 22

The following are functions of a DBMS except ________


.

A. creating and processing forms


B. creating databases
C. processing data
D. administrating databases

Correct Answer: A

QUIZ ~ 23

Helping people keep track of things is the purpose of a(n) ________


.

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 functional dependency is a relationship between or


among:

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?

A. WHERE prod_id LIKE '%_D123%' ESCAPE '_' B.


WHERE prod_id LIKE '%\_D123%' ESCAPE '\'
C. WHERE prod_id LIKE '%_D123%' ESCAPE '%_'
D. WHERE prod_id LIKE '%\_D123%' ESCAPE '\_'

Correct Answer: B

QUIZ ~ 32 Which two statements are true regarding single row functions?
(Choose two.)

A. They accept only a single argument.


B. They can be nested only to two levels.
C. Arguments can only be column values or constants.
D. They always return a single result row for every row of a queried table.
E. They c an return a data type value different from the one that is referenced.

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;

Correct Answer: ADE

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

WHEN MONTHS_BETWEEN (shipment_date,po_date)>1 THEN


TO_CHAR((shipment_date - po_datE.* 20) ELSE 'No Penalty' END PENALTY
FROM shipments;
SQL>SELECT po_id, DECODE
(MONTHS_BETWEEN (po_date,shipment_date)>1,
TO_CHAR((shipment_date - po_datE.* 20), 'No Penalty') PENALTY
FROM shipments;
Which statement is true regarding the above commands?

A. Both execute successfully and give correct results.


B. Only the first query executes successfully but gives a wrong result.
C. Only the first query executes successfully and gives the correct result.
D. Only the second query executes successfully but gives a wrong result.
E. Only the second query executes successfully and gives the correct result.

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

Which statement is true regarding the INTERSECT


operator?
A. It ignores NULL values.
B. Reversing the order of the intersected tables alters the result.
C. The names of columns in all SELECT statements must be identical.
D. The number of columns and data types must be identical for all SELECT statements in the query.

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?

A. SELECT promo_name, promo_cost/promo_end_date-promo_begin_date/7 FROM promotions;


B. SELECT promo_name,(promo_cost/promo_end_date-promo_begin_date)/7 FROM promotions
C. SELECT promo_name, promo_cost/(promo_end_date-promo_begin_date/7) FROM promotions;
D. SELECT promo_name, promo_cost/((promo_end_date-promo_begin_date)/7) FROM promotions;

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:

A. REMOVE FROM CUSTOMER ...


B. DROP FROM CUSTOMER ...
C. DELETE FROM CUSTOMER WHERE ...
D. UPDATE FROM CUSTOMER ...

Correct Answer: C

QUIZ ~ 41
The SQL WHERE clause:

A. limits the column data that are returned.


B. limits the row data are returned.
C. Both A and B are correct.
D. Neither A nor B are correct.
Correct Answer: B

QUIZ ~ 42
Which of the following is the original purpose of
SQL?

A. To specify the syntax and semantics of SQL data definition language


B. To specify the syntax and semantics of SQL manipulation languageC. To define the
data structures
D. All of the above.

Correct Answer: D

QUIZ ~ 43

The wildcard in a WHERE clause is useful


when?

A. An exact match is necessary in a SELECT statement.


B. An exact match is not possible in a SELECT statement.
C. An exact match is necessary in a CREATE statement.
D. An exact match is not possible in a CREATE statement.

Correct Answer: A

QUIZ ~ 44

A view is which of the


following?

A. A virtual table that can be accessed via SQL commands


B. A virtual table that cannot be accessed via SQL commands
C. A base table that can be accessed via SQL commands
D. A base table that cannot be accessed via SQL commands

Correct Answer: A

QUIZ ~ 45

The command to eliminate a table from a database


is:

A. REMOVE TABLE CUSTOMER;


B. DROP TABLE CUSTOMER;
C. DELETE TABLE CUSTOMER;
D. UPDATE TABLE CUSTOMER;

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

Which of the following is valid SQL for an


Index?

A. CREATE INDEX ID;


B. CHANGE INDEX ID;
C. ADD INDEX ID;
D. REMOVE INDEX ID;

Correct Answer: C

QUIZ ~ 49

The SQL keyword(s) ________ is used with


wildcards.

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?

A. SELECT, FROM, WHERE


B. FROM, WHERE, SELECT
C. WHERE, FROM,SELECT
D. SELECT,WHERE,FROM

Correct Answer: A

QUIZ ~ 51

A subquery in an SQL SELECT statement is enclosed


in:

A. braces -- {...}.
B. CAPITAL LETTERS.
C. parenthesis -- (...) .
D. brackets -- [...].

Correct Answer: C

QUIZ ~ 52

The result of a SQL SELECT statement is a(n) ________


.

A. report
B. form
C. file
D. table

Correct Answer: A

QUIZ ~ 53

Which of the following are the five built-in functions provided by


SQL?

A. COUNT, SUM, AVG, MAX, MIN


B. SUM, AVG, MIN, MAX, MULT
C. SUM, AVG, MULT, DIV, MIN
D. SUM, AVG, MIN, MAX, NAME

Correct Answer: A

QUIZ ~ 54
In an SQL SELECT statement querying a single table, according to the SQL-92 standard the asterisk (*)
means that:

A. all columns of the table are to be returned.


B. all records meeting the full criteria are to be returned.
C. all records with even partial criteria met are to be returned.
D. None of the above is correct.

Correct Answer: A

QUIZ ~ 55

The HAVING clause does which of the


following?

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

The SQL -92 wildcards are ____ and ____


.

A. asterisk (*); percent sign (%)


B. percent sign (%); underscore (_)
C. underscore(_); QUIZ ~ mark (?)
D. QUIZ ~ mark (?); asterisk (*)

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

The benefits of a standard relational language include which of the


following?

A. Reduced training costs


B. Increased dependence on a single vendor
C. Applications are not needed.
D. All of the above.

Correct Answer: C

QUIZ ~ 59
DROP TABLE table_name command inserts data into a table

A. TRUE
B. FALSE

Correct Answer: B

QUIZ ~ 60

What is the primary clause in a SELECT


statement?

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

Which clause is used to filter nonaggregate


data?

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

What symbol is used to select all columns from a


table?

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

What clause sorts the rows


returned?

A. GROUP BY
B. FROM
C. WHERE
D. ORDER BY

Correct Answer: D

QUIZ ~ 67

Which function is used to convert a value to a specific data


type?

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

What keyword is used to provide a name for an expression in a SELECT


clause?

A. DISTINCT
B. AS
C. HAVING
D. IS
Correct Answer: B

QUIZ ~ 70

What is a missing or unknown


value?

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

Correct Answer: ABC


QUIZ ~ 79
IN THIS RELATIONHIP, FOR EACH ROW IN ONE TABLE, THERE EXISTS AT MOST ONE RELATED ROW
IN THE OTHER TABLE..

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?

A. WINDOWS AUTHENTICATION AND SOFTWARE AUTHENTICATION


B. WINDOWS AUTHENTICATION AND MIXED MODE AUTHENTICATION
C. SQL AUTHENTICATION AND WINDOWS AUTHENTICATION
D. APPLICATION AUTHENTICATION AND SOFTWARE AUTHENTICATION
E. SQL AUTHENTICATION AND APPLICATION AUTHENTICATION

Correct Answer: B

QUIZ ~ 82
IDENTIFY THREE FILES SQL SERVER USES TO STORE ITS DATA

A. PRIMARY FILE, CONTROL FILE, REDO FILE


B. PRIMARY FILE, SECONDARY FILE, LOG FILE
C. SYSTEM FILE, APPLICATION FILE, LOG FILE
D. TRANSACTION LOG FILE, PRIMARY FILE, SYSTEM FILE
E. SECONDARY FILE, SYSTEM FILE, APPLICATION FILE

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?

A. DROP TABLE Orders


B. DELETE FROM Orders
C. TRUNCATE TABLE Orders
D. DELETE FROM OrderDetails

Correct Answer: B

QUIZ ~ 90

What would DISTINCT in a select statement do data


retrieval?

A. All duplicates in the table would be retrieved from the table.


B. Rows would be retrieved but all duplicates are eliminated from the result of the select statement.
C. Both duplicates and unique rows would be retireved from the table
D. DISTINCT would not have any effect on the table

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

QUIZ ~ 93 For transactions to finally take place in


a database.

A. Commit
B. Rollback
C. Save

Correct Answer: A

QUIZ ~ 94 Restrictions defined on tables to check the


validity of data

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

A. The first row of the table would be deleted


B. The table would be deleted from its database
C. The last row of the table would be deleted
D. All rows of the table would be deleted
Correct Answer: D

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

QUIZ ~ 101 A table having its name beginning with a


single # symbol.

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

QUIZ ~ 103 A column having identity defined on it could


contain duplicates.

A. True
B. False

Correct Answer: B

QUIZ ~ 104 DDL triggers are


executed when

A. There has been a change in table structure


B. There has been a change in data
C. There has been a change in query
D. There has been the execution of a DDL command

Correct Answer: D

QUIZ ~ 105 Functions can be used in the


following except?

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

The command to remove rows from a table 'CUSTOMER' is:

A. REMOVE FROM CUSTOMER ...


B. DROP FROM CUSTOMER ...
C. DELETE FROM CUSTOMER WHERE ...
D. UPDATE FROM CUSTOMER ...
Correct Answer: C

QUIZ ~ 108 Which of the following is not an SQL keyword or


SQL clause?

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

QUIZ ~ 114 What is


ANSI?

A. American National Studios Institute


B. American National Standards Institute
C. American National Servers Institute
D. None of the above

Correct Answer: B

QUIZ ~ 115 What is


SSMS?

A. SQL Server Managerial Studio


B. SQL Server Management Standard
C. SQL Server Management Studio
D. None of the above

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

QUIZ ~ 117 The following are all Data Definition Language


(DDL) except.

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

QUIZ ~ 120 The Structured query language (SQL) used in


SQL Server is:

A. Transact SQL (T-SQL)


B. PL SQL
C. MY SQL
D. MS Access SQL

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.

A. Standard Query Language


B. Sequential Query Language
C. Structured Query Language
D. Server Side Query Language

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

A. SQL server agent


B. Microsoft distribution transaction coordinator
C. Both a & b
D. None of the above

Correct Answer: C

QUIZ ~ 127 . is a utility to capture a continuous record of server activity and provide
auditing capability.

A. SQL server profile


B. SQL server service manager
C. SQL server setup
D. SQL server wizard

Correct Answer: B

QUIZ ~ 128
The query used to remove all references for the pubs and newspubs databases from the system tables is
..

A. DROP DATABASE pubs, newpubs;


B. DELETE DATABASE pubs, newpubs;
C. REMOVE DATABASE pubs, newpubs;
D. DROP DATABASE pubs and newpubs;

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?

A. SELECT sname, coursename FROM studentinfo WHERE age>50 and <80;


B. SELECT sname, coursename FROM studentinfo WHERE age>50 and age <80;
C. SELECT sname, coursename FROM studentinfo WHERE age>50 and WHERE age<80;
D. None of the above

Correct Answer: B

QUIZ ~ 133 How to select all data from studentinfo table starting the name
from letter 'r'?

A. SELECT * FROM studentinfo WHERE sname LIKE 'r%';


B. SELECT * FROM studentinfo WHERE sname LIKE '%r%';
C. SELECT * FROM studentinfo WHERE sname LIKE '%r';
D. SELECT * FROM studentinfo WHERE sname LIKE '_r%';
Correct Answer: A

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?

A. SELECT sname from tblstaff WHERE salary IN (15000, 25000);


B. SELECT sname from tblstaff WHERE salary BETWEEN 15000 AND 25000;
C. Both A and B
D. None of the above

Correct Answer: A

QUIZ ~ 135
The SELECT statement, that retrieves all the columns from empinfo table name starting with d to p is
..

A. SELECT ALL FROM empinfo WHERE ename like '[d-p]%';


B. SELECT * FROM empinfo WHERE ename is '[d-p]%';
C. SELECT * FROM empinfo WHERE ename like '[p-d]%';
D. SELECT * FROM empinfo WHERE ename like '[d-p]%';

Correct Answer: D

QUIZ ~ 136 Select a query that retrieves all of the unique countries from the
student table?

A. SELECT DISTINCT coursename FROM studentinfo;


B. SELECT UNIQUE coursename FROM studentinfo;
C. SELECT DISTINCT coursename FROM TABLE studentinfo;
D. SELECT INDIVIDUAL coursename FROM studentinfo;

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?

A. SELECT * FROM empinfo ORDER BY age;


B. SELECT * FROM empinfo ORDER age;
C. SELECT * FROM empinfo ORDER BY COLUMN age;
D. SELECT * FROM empinfo SORT BY age;

Correct Answer: A

QUIZ ~ 138 Select the right statement to insert values to the


stdinfo table.

A. INSERT VALUES (15?, Hari Thapa, 45, 5000) INTO stdinfo;


B. INSERT VALUES INTO stdinfo (15?, Hari Thapa, 45, 5000);C. INSERT stdinfo
VALUES (15?, Hari Thapa, 45, 5000);
D. INSERT INTO stdinfo VALUES (15?, Hari Thapa, 45, 5000);
Correct Answer: D

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.

A. CHECK, FOREIGN KEY


B. DELETE, FOREIGN KEY
C. CHECK, PRIMARY KEY
D. PRIMARY KEY, FOREIGN KEY

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

QUIZ ~ 148 If no header is specified, the block is said to be an .


PL/SQL block.

A. Strong
B. Weak
C. Empty
D. Anonymous

Correct Answer: D

QUIZ ~ 149

. is a sequence of zero or more characters enclosed by single quotes.

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

QUIZ ~ 153 Count function in SQL returns


the number of

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

QUIZ ~ 157 What is a


DATABLOCK?

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?

A. There is no hierarchy between unlinked groups.


B. The group that is right ranks higher than the group that is to right or below it.
C. The group that is above or leftmost ranks higher than the group that is to right or below it.
D. The group that is left ranks higher than the group that is to the right.

Correct Answer: C

QUIZ ~ 159 Which of the following types of triggers can be fired on


DDL operations?

A. Instead of Trigger
B. DML Trigger
C. System Trigger
D. DDL Trigger
Correct Answer: C

QUIZ ~ 160 What operator performs


pattern matching?
A. IS NULL operator
B. ASSIGNMENT operator
C. LIKE operator
D. NOT operator

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

QUIZ ~ 165 _________ is around one-half of the


maximum seek time.

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 ?

A. Select employee from name B.


Select name
C. Select name from employee
D. Select employee

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 ?

A. Select name,course_id from teaches,instructor where instructor_id=course_id;


B. Select name, course_id from instructor natural join teaches;
C. Select name ,course_id from instructor;
D. Select course_id from instructor join teaches;

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?

A. 1009, 1001, 1018


B. 1009, 1018
C. 1001
D. 1018

Correct Answer: D

QUIZ ~ 176 Which of the following statements


contains an error?

A. Select * from emp where empid = 10003;


B. Select empid from emp where empid = 10006;
C. Select empid from emp;
D. Select empid where empid = 1009 and lastname = 'GELLER';

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 _____.

A. Unknown, unknown, false


B. True, false, unknown
C. True, unknown, unknown
D. Unknown, false, unknown

Correct Answer: D

QUIZ ~ 180 Select


name from instructor
where salary is not
null; Selects

A. Tuples with null value


B. Tuples with no null values
C. Tuples with any salary
D. All of the mentioned

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.

A. Insert into employee values (1005,Rach,0);


B. Insert into employee values (1002,Joey,335);
C. Insert into employee values (1007,Ross, );
D. Both a and c

Correct Answer: C

QUIZ ~ 184 The


primary key must be

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?

A. The expression attempts to divide by a null value.


B. The data types in the conversion function are incompatible.
C. The character string none should be enclosed in single quotes (' ').
D. A null value used in an expression cannot be converted to an actual value

Correct Answer: A

QUIZ ~ 186 The result of


_____unknown is unknown.

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

QUIZ ~ 188 Which of the following is another name for


weak entity?

A. Child
B. Owner
C. Dominant
D. All of the mentioned

Correct Answer: A

QUIZ ~ 189 The____condition allows a general predicate over the relations


being joined.

A. On
B. Using
C. Set
D. Where

Correct Answer: A

QUIZ ~ 190 Which of the join operations do not preserve non


matched tuples.

A. Left outer join


B. Right outer join
C. Inner join
D. Natural join

Correct Answer: C

QUIZ ~ 191
Select *
from student join takes using (ID);
The above query is equivalent to

A. Select * from student inner join takes


using (ID); B. Select * from student outer
join takes using (ID); C. Select *
from student left outer join takes using (ID);
D. Both a and b

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

QUIZ ~ 194 Which are the join types in


join condition:

A. Cross join
B. Natural join
C. Join with USING clause
D. All of the mentioned

Correct Answer: D

QUIZ ~ 195 How many join types in


join condition:

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:

A. Left outer join


B. Right outer join
C. Full outer join
D. Half outer join

Correct Answer: B

QUIZ ~ 197 The operation which is not considered a basic operation of


relational algebra is

A. Join
B. Selection
C. Union
D. Cross product

Correct Answer: A

QUIZ ~ 198 In SQL the statement select * from R, S is


equivalent to

A. Select * from R natural join S


B. Select * from R cross join S
C. Select * from R union join S
D. Select * from R inner join S
Correct Answer: B

QUIZ ~ 199 Two main measures for the efficiency of an


algorithm are

A. Processor and memory


B. Complexity and capacity
C. Time and space
D. Data and space

Correct Answer: C

QUIZ ~ 200 Functional dependencies are a


generalization of

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

A. Counting the maximum memory needed by the algorithm


B. Counting the minimum memory needed by the algorithm
C. Counting the average memory needed by the algorithm
D. Counting the maximum disk space needed by the algorithm

Correct Answer: A

QUIZ ~ 202 The Average case occur in linear


search algorithm

A. When Item is somewhere in the middle of the array


B. When Item is not in the array at all
C. When Item is the last element in the array
D. When Item is the last element in the array or is not there at all

Correct Answer: A

QUIZ ~ 203 The complexity of the average case of


an algorithm is

A. Much more complicated to analyze than that of worst case


B. Much more simpler to analyze than that of worst case
C. Sometimes more complicated and some other times simpler than that of worst case
D. None of the mentioned

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

QUIZ ~ 205 The complexity of Binary


search algorithm is

A. O(n)
B. O(log )
C. O(n2)
D. O(n log n)

Correct Answer: C

QUIZ ~ 206 The complexity of Bubble


sort algorithm is

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

QUIZ ~ 208 Trigger are


supported in

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

QUIZ ~ 210 What are the


after triggers ?

A. Triggers generated after a particular operation


B. These triggers run after an insert, update or delete on a table
C. These triggers run after an insert, views, update or delete on a table
D. Both b and c

Correct Answer: B

QUIZ ~ 211 The variables in the triggers are


declared using

A. -
B. @
C. /
D. /@

Correct Answer: B

QUIZ ~ 212 The default extension for an Oracle


SQL*Plus file is:

A. .txt
B. .pls
C. .ora
D. .sql

Correct Answer: B

QUIZ ~ 213 Which of the following is NOT an Oracle-


supported trigger?

A. BEFORE
B. DURING
C. AFTER
D. INSTEAD OF

Correct Answer: D

QUIZ ~ 214 What are the


different in triggers ?
A. Define, Create
B. Drop, Comment
C. Insert, Update, Delete
D. All of the mentioned

Correct Answer: B

QUIZ ~ 215 Triggers ________


enabled or disabled

A. Can be
B. Cannot be
C. Ought to be
D. Always

Correct Answer: A

QUIZ ~ 216 Which prefixes are available to


Oracle triggers?

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

QUIZ ~ 218 Which one of the following statements about normal


forms is FALSE?

A. BCNF is stricter than 3NF


B. Lossless, dependency-preserving decomposition into 3NF is always possible
C. Lossless, dependency-preserving decomposition into BCNF is always possible
D. Any relation with two attributes is in BCNF

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

QUIZ ~ 220 Which of the


following is TRUE?

A. Every relation in 2NF is also in BCNF


B. A relation R is in 3NF if every non-prime attribute of R is fully functionally dependent on every key of R
C. Every relation in BCNF is also in 3NF
D. No relation can be in both BCNF and 3NF

Correct Answer: C

QUIZ ~ 221 Which one of the following


statements if FALSE?

A. Any relation with two attributes is in BCNF


B. A relation in which every key has only one attribute is in 2NF
C. A prime attribute can be transitively dependent on a key in a 3 NF relation.
D. A prime attribute can be transitively dependent on a key in a BCNF relation.

Correct Answer: D

QUIZ ~ 222 Dates must be specified


in the format

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

QUIZ ~ 225 The user defined data type can be


created using

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

QUIZ ~ 228 Which of the following closely resembles


Create view ?

A. Create table . . .like


B. Create table . . . as
C. With data
D. Create view as

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.

A. create table temp_instructor;


B. Create table temp_instructor like instructor;
C. Create Table as temp_instructor;
D. Create table like temp_instructor;

Correct Answer: B

QUIZ ~ 231 To include integrity constraint in a existing


relation use :

A. Create table
B. Modify table
C. Alter table
D. Drop table

Correct Answer: C

QUIZ ~ 232 Which of the following is not a


integrity constraint ?

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

QUIZ ~ 236 Which of the following is the right syntax


for assertion?

A. Create assertion 'assertion-name' check 'predicate';


B. Create assertion check 'predicate' 'assertion-name';
C. Create assertions 'predicates';
D. All of the mentioned

Correct Answer: A

QUIZ ~ 237 Data integrity


constraints are used to:

A. Control who is allowed access to the data


B. Ensure that duplicate records are not entered into the table
C. Improve the quality of data entered for a specific property (i.e., table column) D.Prevent users
fromchanging the values stored in the table

Correct Answer: C

QUIZ ~ 238 Which of the following can be addressed by enforcing a referential


integrity constraint?

A. All phone numbers must include the area code


B. Certain fields are required (such as the email address, or phone number) before the record is accepted
C. Information on the customer must be known before anything can be sold to that customer
D. When entering an order quantity, the user must input a number and not some text (i.e., 12 rather than
'adozen')

Correct Answer: C

QUIZ ~ 239 _____________ can help us detect


poor E-R design.

A. Database Design Process


B. E-R Design Process
C. Relational scheme
D. Functional dependencies
Correct Answer: D

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.

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: 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.

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: 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

QUIZ ~ 244 What is the best way to represent the attributes in a


large database?

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 ?

A. Dept name, year->size


B. Year->size
C. Dept name->size
D. Size->year

Correct Answer: A

QUIZ ~ 247
Which one of the following is used to define the structure of the relation ,deleting relations and relating
schemas ?

A. DML(Data Manipulation Langauge)


B. DDL(Data Definition Langauge)
C. Query
D. Relational Schema

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 ?

A. DML(Data Manipulation Langauge)


B. DDL(Data Definition Langauge)
C. Query
D. Relational Schema

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

QUIZ ~ 260 All aggregate functions ignore NULLs


except for ............

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 .......

A. user defined strict permissions


B. object owners
C. members of sysadmin
D. nested roles

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

QUIZ ~ 274 A merge join


can be . . . . .

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

QUIZ ~ 277 Merge joins support all outer and semi-


join variations.

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

QUIZ ~ 283 Hash join is designed to handle


large . . . . inputs.

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

QUIZ ~ 286 Hash join requires an


equality predicate.

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

QUIZ ~ 288 Hash join performs its operations in 2


phases . . . . . .

A. initial phase and probe phase


B. init phase and probe phase
C. build phase and probe phase
D. build phase and problem phase

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

Columnstore indexes give high performance gains . . . . . . . . .

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

QUIZ ~ 302 SQL Server can automatically provide


values for ......

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

QUIZ ~ 303 Which of the following insert


statements are correct:

A. INSERT INTO Persons ('xxx1','yyy1');


B. INSERT INTO [dbo].[Persons]
([LastName],
[FirstName]
)
VALUES ('xxx',
'yyy'
);
C. INSERT INTO Persons VALUES ('xxx1','yyy1');
D. INSERT INTO Persons VALUE ('xxx1','yyy1');

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

QUIZ ~ 306 You can use the INSERT statement to insert


data into 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 )

Correct Answer: ACD

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

A. SQL SERVER generates an error


B. SQL Server resolves full-column lists whenever the INSERT statement executes
C. INSERT statement can insert the data in different table then specified
D. INSERT statement may generate an error if the underlying table schema changes

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

QUIZ ~ 311 SQL Server supports two


types of CTEs:

A. indexed and nonindexed


B. recursive and nonrecursive
C. with view and without views
D. None of above

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:

A. The DISTINCT Keyword


B. The TOP keyword
C. GROUP BY or Having clauses
D. All of above

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

QUIZ ~ 319 Tables which are on the remote servers cannot be


referenced in the CTE.

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

QUIZ ~ 321 RAND () method


can be used for:

A. Executing the query randomly.


B. gives a pseudo-random float value
C. return values randomly
D. All of the above
Correct Answer: B

QUIZ ~ 322 What is the significance of LEFT method in SQL


server 2012?

A. Executes left query in joins


B. There is no method called LEFT in SQL Server.
C. It gives the left part of a character input string with the mentioned no. of characters.
D. None of the above

Correct Answer: C

QUIZ ~ 323 What is the purpose of CAST function in


SQL server?

A. It converts or casts an expression of 1 data type to another.


B. It cannot be in SQL Server
C. Add description to statement
D. None of the above

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 ~ 325 What is the purpose of MIN function in


SQL Server?

A. It returns the minimum value in the expression


B. It is use for decrementing the integer value
C. MIN is not a SQL server function
D. None of the above
Correct Answer: A

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

QUIZ ~ 327 A nonclustered index greatly affect the ordering and


storing of the data.

A. True
B. False

Correct Answer: B

QUIZ ~ 328 Full-text indexes are


created using the

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

QUIZ ~ 330 Each database can have only one


clustered index.

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

QUIZ ~ 335 If an index is ............................. the metadata and statistics


continue to exist.

A. disabling
B. dropping
C. altering
D. Both a & b

Correct Answer: A

QUIZ ~ 336 Index rebuild and index reorganize is one and


the same thing.

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

QUIZ ~ 338 For Joint type "nested loop" Join


hint is . . . . . .

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

QUIZ ~ 343 A . . . . hint takes precedence over a . . . . hint if both


are specified.

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

QUIZ ~ 352 Below subquery is


valid or invalid:

Select (Select 5) As MySubQueryValue;

A. Valid
B. Invalid

Correct Answer: A

QUIZ ~ 353 There cannot be a subquery which is independent of


the outer query.

A. True
B. False

Correct Answer: B

QUIZ ~ 354 Below is


an example of

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

QUIZ ~ 356 A subquery can be used anywhere an


expression is allowed.

A. True
B. False

Correct Answer: A

QUIZ ~ 357 The ................. statement is used to create a table


in a database.

A. CREATE SQL TABLE B.


CREATE TABLE
C. CREATE SQL.TABLE
D. Both B and C

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

QUIZ ~ 360 Transaction rollbacks affect


Table variables

A. True
B. False
B.
Correct Answer: B

QUIZ ~ 361 ##table refers to a ............. which is


visible to all users.

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

A. List of system tables of Database


B. List of temporary tables of Database
C. List of all tables of Database
D. Both A & B

Correct Answer: C

QUIZ ~ 364
sp_tables returns only the views in the database.

A. True
B. False

Correct Answer: B

QUIZ ~ 365 In order to modify system tables


you can use:

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

QUIZ ~ 367 What is the basic syntax for


Delete query?

A. Delete * from tablename;


B. Delete from tablename;
C. Delete column1, Column2, column(n) from tablename;
D. All are correct.

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

QUIZ ~ 369 Is TOP used in


Delete Query?

A. True
B. False

Correct Answer: A

QUIZ ~ 370 Which category


Delete query exits?

A. DDL
B. DML
C. TCLD. BPL

Correct Answer: B

QUIZ ~ 371 Does delete statement


maintains lock?

A. True
B. False

Correct Answer: A

QUIZ ~ 372 Delete statements locks whole Table or a single


Row at a time?

A. Delete never locks any table or row.


B. Delete never locks any row while deleting.
C. Delete locks only Row.
D. Delete locks both Row and table.

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?

A. Delete never retain Identity


B. Delete never recognizes identity
C. Delete retain identity value
D. None of the above

Correct Answer: C

QUIZ ~ 374 Out of the below constraints which one is applicable on


Delete query?

A. Row level constraints


B. Page level constraintsC. Table Level constraints
D. None of the above.

Correct Answer: A

QUIZ ~ 375 Does delete statement


enables triggers?

A. Yes
B. No

Correct Answer: A

QUIZ ~ 376 Which category


Delete query exits?

A. DDL
B. DML
C. TCLD. BPL

Correct Answer: A

QUIZ ~ 377 Can we use Where condition


in Truncate?

A. True
B. False

Correct Answer: A

QUIZ ~ 378 What is not true


about truncate?

A. Truncate delete the record from the table


B. Truncate fires trigger after deleting the record
C. Truncate is used to delete a record
D. It runs trigger after deletion

Correct Answer: D

QUIZ ~ 379 Does Truncate


maintain log?

A. True
B. False

Correct Answer: B

QUIZ ~ 380 Which one is faster to


delete a table?

A. Truncate
B. Delete
C. Remove
D. None of the above

Correct Answer: A

QUIZ ~ 381 What are the restrictions while


using Truncate?

A. Foreign Key only,


B. No restrictions
C. Foreign key, participation in indexed view
D. None of the above

Correct Answer: C

QUIZ ~ 382 Does truncate


retain Identity?

A. Never retains Identity


B. Reset to the seed value
C. No Change on Identity
D. None of the above

Correct Answer: B

QUIZ ~ 383 Truncate statement locks whole Table or a single


Row at a time?

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

QUIZ ~ 385 What is true about truncate with


Foreign key?

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

QUIZ ~ 387 Which one is not applicable while


querying on a view?

A. From
B. SELECT
C. Order By
D. Where

Correct Answer: C

QUIZ ~ 388 Can we create Clustered Index with Count


(*) in a view?

A. True
B. False

Correct Answer: B

QUIZ ~ 389 Refer below query which leads to create a view named
vwEmployee.

CREATE vwEmployee VIEW


AS
SELECT nothing
FROM dbo.Employee WHERE
ID < 100 Now, tell the problem
in query? A. Above query is
correct.
B. View name must be after keyword view and 'nothing' is not a keyword , so should be replaced with *.
C. Replace nothing with view name.
D. Replace nothing with column names.

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

QUIZ ~ 391 IN SQL Server, can we Create


Partitioned Views?

A. True
B. False

Correct Answer: A

QUIZ ~ 392
How can you drop more than one View in single command?

A. Drop viewname1 + viewname2 + viewname(n);


B. Drop viewname1; Drop viewname2; Drop viewname(n);
C. Drop viewname1; viewname2; viewname(n);
D. Drop viewname1, viewname2,viewname(n);

Correct Answer: D

QUIZ ~ 393 What is true about views among all the given
below statements:

A. View never references actual table for which it is created.


B. View can't use JOIN in it's query.
C. The performance of the view degrades if they are based on other views.
D. Only option to safeguard data integrity.

Correct Answer: C

QUIZ ~ 394 Can we show computed values in views from different


columns of a table?

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

QUIZ ~ 396 Are views stored


in Databases?

A. Yes
B. No

Correct Answer: A

QUIZ ~ 397 Which of the following is not a Key in


SQL Server?

A. Primary
B. Foreign
C. Alternate
D. Secondary

Correct Answer: D

QUIZ ~ 398 Can a column with Primary Key


have Null value?

A. True
B. False

Correct Answer: B

QUIZ ~ 399 How can a SQL developer add a


key on a table?

A. While creating a table


B. With Alter table command
C. With SQL server Properties window (by right clicking on a table)
D. All of the above
E. None of the above

Correct Answer: D

QUIZ ~ 400 Can a key created on a table


be Dropped?

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

QUIZ ~ 402 Can a table have more than


one foreign key?

A. True
B. False

Correct Answer: A

QUIZ ~ 403 By default, which key creates


Clustered index?

A. Foreign Key
B. Unique Key
C. Primary Key
D. None of the above

Correct Answer: C

QUIZ ~ 404 Which key accepts multiple


NULL values?

A. Foreign Key
B. Unique Key
C. Primary Key
D. None of the above

Correct Answer: A

QUIZ ~ 405 Can column with Unique key have


duplicate values?

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

QUIZ ~ 407 Consider


the below table.

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

What is the result of the below query:

select * from tab_1 where '0' in (select ID from


Tab_1 where ID in (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

QUIZ ~ 409 Only EXISTS can be prefixed with NOT but


IN cannot be.

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

QUIZ ~ 412 The keyword EXISTS is not


preceded by a ............

A. constant
B. column name
C. other expression
D. All of above

Correct Answer: D

QUIZ ~ 413 Consider


the below table.

Table dbo.tab_1
ID Column_2 Name
11 F1 Fardeen
22 G1 Gautam
33 H1 Harish
44 I1 Fardeen
55 E1 Eklavya

What is the result of the below query:

DECLARE @InList varchar(100)


SET @InList = '11,12,33,44'

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

QUIZ ~ 414 Consider


the below table.

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

What will be the result of following query:

SELECT ID, column_2, Name


FROM dbo.tab_1
WHERE EXISTS (SELECT 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

QUIZ ~ 418 Which one is correct syntax for


Update Statement?

A. Update Table table_name Columns(Col1, Col2,Col3);


B. Update into table_name (Col1, Col2,Col3) VALUES (Val1,Val2,Val3);
C. Update table_name Set Col_name=Value;
D. None of the above

Correct Answer: C

QUIZ ~ 419 Is mentioning column name corresponding to its value mandatory in


Update Statement?

A. True
B. False

Correct Answer: A

QUIZ ~ 420 What will be the consequence of omitting 'Where' clause in


Update Statement?

A. No effect on the query as well as on table.


B. All records present in the table will be updated
C. Only one record will be updated
D. None of the above

Correct Answer: B

QUIZ ~ 421 In any case, can update statement be used in place of


insert statement?
A. Yes, if record exists with Identity value.
B. Yes, in every case
C. No, it is not possible at all.
D. None of the above.

Correct Answer: A

QUIZ ~ 422

Can insert be used in place of update?

A. True
B. False
C. It is replacement of update
D. None of the above

Correct Answer: B

QUIZ ~ 423 Can we use 'where' clause in an


Insert statement?

A. True
B. False

Correct Answer: B

QUIZ ~ 424 Which one is correct syntax for Where clause in


SQL server?

A. SELECT WHERE "Condition" Col1, Col2 FROM "Table" ;


B. SELECT "Condition" Col1, Col2 FROM "Table" WHERE;
C. SELECT Col1, Col2 FROM "Table" WHERE "condition";
D. None of the above

Correct Answer: C

QUIZ ~ 425 What can be the condition in where clause in


a SQL query?

A. Condition that is to be met for the rows to be returned from result.


B. Boolean Condition only
C. Text condition only
D. None of the above

Correct Answer: A

QUIZ ~ 426 Is there any limit for number of predicates/conditions to be added in a


Where clause?

A. True
B. False

Correct Answer: B
QUIZ ~ 427 What is the purpose of Order By Clause in
SQL server?

A. It is used to sort the result.


B. It is used to change sequence order of columns
C. It can' be used in SQL Server
D. None of the above

Correct Answer: A

QUIZ ~ 428 Order by can only be used by Where


Clause, correct?

A. True
B. False

Correct Answer: B

QUIZ ~ 429 What needs to be added when user want to show results by
Descending Order?

A. Descending order cannot be possible.


B. User can add DESC with Order By clauseC. User can add '<>ASC' with
Order by Clause.
D. None of the above

Correct Answer: B

QUIZ ~ 430 What is the default order of


Order by Clause?

A. Descending
B. Ascending
C. Random
D. None of the above

Correct Answer: B

QUIZ ~ 431 Among the below Order By queries, which are


correct ones?

A. SELECT * FROM Table Order By Column;


B. SELECT * FROM Table Order By Column ASC;
C. SELECT * FROM Table Order By Column DESC;
D. SELECT * FROM Table Order By (n); --Where n is any column sequence number in a table
E. All of the above
F. None of the above

Correct Answer: E

QUIZ ~ 432 Is it possible to have both Orders (i.e. ASC/DESC.in a


single query?
A. True
B. False

Correct Answer: A

QUIZ ~ 433 Can 'IN' operator be used with


Where clause?

A. True
B. False
Correct Answer: A

QUIZ ~ 434
What does UNION operator do in a SQL Server statement?

A. Bring common data from the listed tables.


B. Bring data which is not common from the listed tables.
C. Bring all data from the listed tables.
D. Bring all distinct from the listed tables.

Correct Answer: D

QUIZ ~ 435 Which one is correct syntax for applying


UNION operator?

A. SELECT column_name(s) FROM table_name1 UNION table_name2


B. SELECT column_name(s) FROM table_name1UNION
SELECT column_name(s) FROM table_name2
C. UNION SELECT column_name(s) FROM table_name1SELECT column_name(s)
FROM table_name2
D. SELECT FROM table_name1 AND table_name2

Correct Answer: B

QUIZ ~ 436 How can we get all records (redundant as well as non-redundant) from
union operator?

A. Using 'ALL' operator with UNION.


B. Using 'Distinct' operator with UNION.
C. We get all records (redundant as well as non-redundant) with UNION operator by default.
D. None of the above.

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

QUIZ ~ 440 UNION operator requires an extra overhead of removing redundant


rows, is it true?

A. True
B. False

Correct Answer: A

QUIZ ~ 441 What is true about order by with


Union operator?

A. Order By can be issued in each result set.


B. It can be issued for the overall result set.
C. Both A & B.
D. None of the above

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

QUIZ ~ 444 The JOIN which does Cartesian


Product is called?

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

QUIZ ~ 447 What are also


called Self Joins?

A. OUTER Joins
B. INNER joins

Correct Answer: B

QUIZ ~ 448
What is true about NOT INNER JOIN?

A. It is a JOIN which restricts INNER JOIN to work.


B. It is one of the type of the JOINS in SQL Server.
C. When full Outer Join is used along with WHERE. This join will give all the results that were not present
inInner Join.
D. None of the above.

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?

A. Out, In, Equi


B. Left, In, Cross
C. Equi, Natural, Cross
D. None of the above

Correct Answer: C

QUIZ ~ 451 Which type of Inner Join restricts fetching of


redundant data?

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:

A. Left outer join


B. Right outer join
C. Full outer join
D. Half outer join

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