DBMS MCQ Questions and Answer Set-3

1. What operator tests the column for the absence of data?

A. EXISTS operator

B. NOT operator

C. IS NULL operator

D. None of these

Answer:  C

2. In SQL, which command(s) is (are) used to change a table’s storage characteristic?

A. ALTER TABLE

B. MODIFY TABLE

C. CHANGE TABLE

D. All of the above

Answer:  A

3. A command that lets you change one or more fields in a record is

A. Insert

B. Modify

C. Look-up

D. All of the above

Answer: B

4. Which SQL keyword is used to retrieve a maximum value?

A. TOP

B. MOST

C. UPPER

D. MAX

Answer:  D

5. What is a view?

A. view is a special stored procedure executed when a certain event occurs.

B. A view is a virtual table that results in executing a pre-compiled query. A view is not part of the physical database schema, while the regular tables are.

C. A view is a database diagram.

D. None of these

Answer:  B

6. The SQL statement 

SELECT SUBSTR(‘123456789’, INSTR(‘abcabcabc’, ‘b’), 4) FROM DUAL;

A.6789

B.2345

C.1234

D.456789

Answer:  B

7. Which of the following group functions ignore NULL values?

A. MAX

B. COUNT

C. SUM

D. All of the above

Answer:  D

8. Which of the following is illegal?

A.SELECT SYSDATE – SYSDATE FROM DUAL;

B. SELECT SYSDATE – (SYSDATE – 2) FROM DUAL;

C. SELECT SYSDATE – (SYSDATE + 2) FROM DUAL;

D. None of these

Answer:  D

9. The term for information that describes what type of data is available in a database is:

A. Data dictionary

B. data repository

C. Index data

D. Metadata

Answer: D

10. Table Employee has 10 records. It has a non-NULL SALARY column which is also UNIQUE.

The SQL statement

SELECT COUNT(*) FROM Employee WHERE SALARY > ANY (SELECT SALARY FROM EMPLOYEE);

Prints

A.10

B.9

C.5

D.0

Answer: B

11. The SQL statement

SELECT ROUND(45.926, -1) FROM DUAL;

A. is illegal

B. prints garbage

C. prints 045.926

D. prints 50

Answer:  D

12. Which of the following must be enclosed in double-quotes?

A. Dates

B. Column Alias

C. Strings

D. All of the above

Answer: B

13. What is the meaning of LIKE ‘%0%0%’

A. Feature begins with two 0’s

B. Feature ends with two 0’s

C. Feature has more than two 0’s

D. Feature has two 0’s in it, at any position

Answer: D

14. What does the following query find?

(SELECT DISTINCT r.sid FROM boats b, reserves r

WHERE b.bid = r.bid AND b.color = ‘red’)

MINUS

(SELECT DISTINCT r.sid FROM boats b, reserves r

WHERE b.bid = r.bid AND b.color = ‘green’)

A. Find the sailor IDs of all sailors who have reserved red boats but not green boats

B. Find the sailor IDs of at least one sailor who have reserved red boats but not green boats

C. Find the sailor Ids of at most one sailor who have reserved red boats but not green boats

D. None of These

Answer: Option A

15. The SELECT statement SELECT ‘Hi’ FROM DUAL WHERE NULL = NULL; Outputs

A. Hi

B.FALSE

C.TRUE

D. Nothing

Answer: D

if you have any questions regarding database management system then comment your questions

Thank you

Leave a Reply

Your email address will not be published. Required fields are marked *