SQL Mock Test


This section presents you various set of Mock Tests related to SQL Framework. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.

Questions and Answers

SQL Mock Test III

Q 2 - Which of the following comparison operators could be used in a multiple row query?

A - IN operator

B - ANY operator

C - ALL operator

D - All of the above

Answer : D

Answer : A

Q 4 - In which of the following cases a DML statement is not executed?

A - When existing rows are modified

B - When some rows are deleted

C - When a table is deleted

D - All of the above

Answer : C

Q 11 - Which statement allows conditional update, or insertion of data into a table simultaneously?

A - INSERT statement

B - MERGE statement

C - UPDATE statement

D - None of the above

Answer : B

Answer : A

Q 18 - Consider the following schema −

LOCATIONS(subject_code, department_name, location_id, city);

Which code snippet will alter the table LOCATIONS and add a column named Address, with datatype VARCHAR2(100)?

A - ALTER TABLE locations ADD (address varchar2(100));

B - ALTER TABLE locations ADD COLUMN(address varchar2(100));

C - MODIFY TABLE locations ADD COLUMN (address varchar2(100));

D - None of the above.

Answer : A

Q 19 - Consider the following schema −

LOCATIONS(subject_code, department_name, location_id, city);

Which code snippet will alter the table LOCATIONS and change the datatype of the column CITY to varchar2(30)?

A - ALTER TABLE locations MODIFY COLUMN (city varchar2(30));

B - MODIFY TABLE locations ADD (city varchar2(30));

C - ALTER TABLE locations MODIFY (city varchar2(30));

D - None of the above.

Answer : C

Q 20 - Consider the following schema −

LOCATIONS(subject_code, department_name, location_id, city);

Which code snippet will alter the table LOCATIONS and delete the column named CITY?

A - MODIFY TABLE locations DROP (city varchar2(30));

B - ALTER TABLE locations DROP COLUMN city;

C - ALTER TABLE locations DROP (city);

D - None of the above.

Answer : B

Q 21 - Which of the following code will successfully delete the table LOCATIONS from the database?

A - DROP TABLE locations;

B - DELETE TABLE locations;

C - TRUNCATE TABLE locations;

D - None of the above.

Answer : A

Answer : D

Q 23 - Which of the following code will remove all the rows from the table LOCATIONS?

A - DROP TABLE locations;

B - DELETE TABLE locations;

C - TRUNCATE TABLE locations;

D - None of the above.

Answer : C

Answer Sheet

Question Number Answer Key
1 B
2 D
3 A
4 C
5 B
6 D
7 D
8 D
9 A
10 C
11 B
12 D
13 D
14 C
15 B
16 B
17 A
18 A
19 C
20 B
21 A
22 D
23 C
24 C
25 A
sql_questions_answers.htm
Advertisements