CS/IT MCQ Collections

MCQ Questions on Structured Query Language set-5

Pinterest LinkedIn Tumblr

This set of MCQ questions on structured query language includes the collection of multiple-choice questions on keywords, operators, and statements used in SQL. It includes MCQ questions on writing SQL statements inside an embedded SQL program, data definition language commands, and data manipulation language commands used in the structured query language.

1) ……keyword is used to eliminate the duplicates.
A. distinct
B. unique
C. union
D. intersect

2) ……….is a query that has another query embedded within it.
A. subquery
B. structured query
C. nested query
D. sequence query

3) Which of the following is not an aggregate operator?
A. MAX
B. MIN
C. TOTAL
D. AVG

4) Any SQL statement inside an embedded SQL program must be inside the boundaries of…
A. EXE SQL and END
B. EXEC SQL and END
C. EXEC and END-EXEC
D. EXEC SQL and END-EXEC

5) In embedded SQL, the pre-compiler translates the SQL statements inside the code blocks into the appropriate…
A. PL/SQL block
B. SQL * plus
C. 3GL statements
D. equivalent C code blocks

6) …….. accepts multiple rows a SQL query, stores them and hands over them one by one to the 3GL program.
A. database program
B. database cursor
C. database object
D. database constraints

7) The ……….. is useful in the case of online application.
A. embedded SQL
B. PL/SQL
C. static SQL
D. dynamic SQL

8) What is the Role of the revoke command?
A. To give privilege
B. To get back privilege
C. To execute the query
D. To run the program

9) The clause ALTER TABLE in SQL can be used to
A. add an attribute
B. delete an attribute
C. alter the default values of an attribute
D. all of the above

Read Also: Solved MCQ on SQL With Answer

10) Which of the following operations need the participating relations to be union compatible?
A. UNION
B. INTERSECTION
C. DIFFERENCE
D. All of the above

11) …….. is a virtual table that draws its data from the result of an SQL SELECT statement.
A. View
B. Synonym
C. Sequence
D. Transaction

12) In SQL, which of the following is not a data definition language commands?
A. RENAME
B. REVOKE
C. GRANT
D. UPDATE

13) In SQL, which command(s) is(are) used to change a table’s storage characteristics?
A. ALTER TABLE
B. MODIFY TABLE
C. CHANGE TABLE
D. All of the above

14) Which command will delete all data from a table and will not write to the rollback segment?
A. DROP
B. DELETE
C. CASCADE
D. TRUNCATE

15) Which is not part of the Data Definition Language?
A. CREATE
B. ALTER
C. ALTER SESSION
D. CREATE SESSION

16) What operator tests the column for the absence of data?
A. IS Null operator
B. ASSIGNMENT operator
C. LIKE operator
D. NOT operator

17) NOT BETWEEN 10 AND 20 ……
A. displays NULL values
B. does not display NULL values
C. may display NULL values
D. display values

18) Which of the following SQL commands can be used to add data to a database table?
A. ADD
B. UPDATE
C. APPEND
D. INSERT

19) …….. can be used to retrieve data from multiple tables.
A. Embedded SQL
B. Dynamic SQL
C. Joins
D. Views

Read Also: Objective Questions on SQL and Embedded SQL set-4

Answers:

1) A. distinct
2) C. nested query
3) C.TOTAL
4) D. EXEC SQL and END-EXEC
5) C. 3GL statements
6) B. database cursor
7) D. dynamic SQL
8) B. To get back privilege
9) D. All of the above
10) D. All of the above
11) A. View
12) D. UPDATE
13) A. ALTER TABLE
14) B. DELETE
15) C. ALTER SESSION
16) A. IS Null operator
17) B. does not display NULL values
18) D. INSERT
19) C. Joins

Read Next: Solved MCQ of SQL Server set-1
Read More: Collections of DBMS MCQ questions
Download: Free PDF E-book of DBMS MCQ questions

Author

Shuseel Baral is a web programmer and the founder of InfoTechSite has over 8 years of experience in software development, internet, SEO, blogging and marketing digital products and services is passionate about exceeding your expectations.

Comments are closed.