0% found this document useful (0 votes)
104 views5 pages

Database Management System

This document contains 25 multiple choice questions about SQL and database management systems. It covers topics like SQL commands, the DUAL table, functions like SUBSTR and INSTR, wildcard characters, and order of operations for logical operators. The questions test knowledge of SQL syntax, functions, tables and how to interpret queries.

Uploaded by

bhavesh agrawal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
104 views5 pages

Database Management System

This document contains 25 multiple choice questions about SQL and database management systems. It covers topics like SQL commands, the DUAL table, functions like SUBSTR and INSTR, wildcard characters, and order of operations for logical operators. The questions test knowledge of SQL syntax, functions, tables and how to interpret queries.

Uploaded by

bhavesh agrawal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

DATABASE MANAGEMENT SYSTEM

1. Which of the following activities are you allowed to do after executing the DISCONNECT
command?

(a) Reconnect (b) Exit the SQL plus session


(c) Execute certain SQL plus commands (d) All of these

2. What does the / command do?

(a) Does nothing


(b) Print the character /
(c) Re-executes the non-SQL plus command that was most recently executed
(d) Re-executes the most recently executed command

3. Which of the following is buffered by SQL plus?

(a) SQL statements (b) SQL plus commands


(c)PL/SQL block (d) All of the above

4. The DUAL table has:

(a) One row with many columns


(b) One column with many rows
(c) One row and one column
(d) Many rows and many columns

5. The owner of DUAL table is:

(a) SYS (b) Super user


(c) Scott (d) Manager

6. The DESCRIBE command if used on a table will not display information about:

(a) Primary keys; indexes (b) Default values


(c) Triggers (d) All of the above

1
7. Which of the following information will be displayed when you use DESCRIBE command on
functions?

(a) Data type of return value, parameter


(b) Mode of the parameter
(c) Default value of the parameter
(d) All of the above

8. Which command is used to get input from the user?

(a) GET (b) ACCEPT


(c) READ (d) CIN

9. NOT BETWEEN 10 and 20

(a) Display NULL values (b) Does not display NULL values
(c) May display NULL values (d) None of these

10. The SQL statement:


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

Prints:
(a) 6789 (b) 2345
(c) 1234 (d) 456789

11. The SELECT statement:


SELECT ‘Hi’ from DUAL when 1= NULL;

Outputs:
(a) Hi (b) False
(c) True (d) Nothing

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

(a) MAX (b) COUNT


(c) SUM (d) All of the above
2
13. Table Employee has IO 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);

(a) 10 (b) 9
(c) 5 (d) 0

14. The SQL statement:


SELECT SUBSTR (‘abcdefghij’, INSTR (‘123321234’, ‘2’, 3, 2), 2) FROM DUAL;

Prints:
(a) gh (b) 23
(c) bc (d) ab

15. From where the following combinations of wild characters, choose those that are equivalent:

(i) % (ii) __%


(iii) %__ (iv) __ __

(a) (i), (ii) (b) (ii), (iii)


(c) (i), (iv) (d) (ii), (iv)

16. Almost all the DATE functions return the value of data type DATE, except

(a) Months_between (b) Round


(c) Next _day (d) Trunc

17. The SQL statement:


SELECT ‘HI’ from DUAL WHERE 1!= NULL

(a) True (b) Hi


(c) False (d) Nothing

18. The SQL statement:


SELECT TRUNC (45.926, -1) from DUAL;

3
(a) 13 illegal (b) 5
(c) prints 45.9 (d) prints ‘40’

19. The statement:


SELECT ‘Hi’ from DUAL where NULL= NULL;

(a) Hi (b) False


(c) True (d) Nothing

20. Choose the correct statements:

(a) ORDER by NAME ASC, display NULL’s last


(b) ORDER by NAME DESC, display NULL’s first
(c) ORDER by NAME ASC, display Null’s first
(d) Both (a) and (b)

21. When a SELECT statement displays data:

(i) datas and strings will be justified to the left by default


(ii) numbers will be justified to the right by default
(iii) datas and strings will be justified to the right by default
(iv) numbers will be justified to the left by default

(a) (i), (ii) (b) (iii), (iv)


(c) (i) only (d) (iii) only

22. If a query involves NOT, AND, OR with no parenthesis:

(a) NOT will be evaluated first, AND second, OR last


(b) NOT first, OR second, AND last
(c) AND first, OR second, NOT last
(d) the order of occurance determines evaluation

23. The SQL statement:


SELECT LPAD (‘abcd’, 10, ‘*’) from DUAL

4
(a) abcd****** (b) ******abcd
(c) ***abcd*** (d) **********

24. The SQL statement


SELECT INSTR (‘abcdefgh’, ‘c’) from DUAL;

Prints:
(a) 2 (b) 3
(c) 5 (d) 6

25. Which of the following combinations of wild card characters has the same meaning as the
wild card character % ?

(a) % % (b) __%


(c) %__ (d) __ __

You might also like