Top 1000+ Solved DataBase Management System (DBMS) MCQ Questions Answer
Q. PL/SQL has two types of subprograms, procedures and functions. Which subprogram isused to compute a value?
a. Procedure
b. Function
c. Both A & B
d. None of the above
Q. Which datatype is not allowed in the definition of PL/SQL record?
a. A Collection
b. A Scalar
c. Both A & B
d. None of the above
Q. In the SQL Cursor, which attribute is TRUE when a cursor has some remaining rows to fetch, and FALSE when a cursor has no rows left to fetch?
a. %ROWCOUNT
b. %FOUND
c. %NOTFOUND
d. %ISOPEN
Q. For which Exception, if a SELECT statement attempts to retrieve data based on its conditions, this exception is raised when no rows satisfy the SELECT criteria?
a. TOO_MANY_ROWS
b. NO_DATA_FOUND
c. VALUE_ERROR
d. DUP_VAL_ON_INDEX
Q. Which collection types is also known as index-by tables, lets you look up elements Using arbitrary numbers and strings for subscript values?
a. Associative arrays
b. Nested tables
c. Varrays
d. None of the above
Q. Assigning a value to a collection element can cause exceptions, such as
a. If the subscript is NULL or is not convertible to the right datatype, PL/SQL raises the predefined exception VALUE_ERROR. Usually, the subscript must be an integer. Associative arrays can also be declared to have VARCHAR2 subscripts.
b. If the subscript refers to an uninitialized element, PL/SQL raises SUBSCRIPT_BEYOND_COUNT.
c. If the collection is atomically null, PL/SQL raises COLLECTION_IS_NULL.
d. All mentioned above
Q. Which is a procedural extension of Oracle- SQL that offers language constructs similar tothose in imperative programming languages?
a. PQL
b. Advanced SQL
c. PL/SQL
d. SQL
Q. Which of the following retains duplicate rows in the result of a query or in an Aggregate expression?
a. ALL
b. DISTINCT
c. PRIOR
d. None of the above
Q. Which command is used to add a column to an existing table?
a. Create
b. Update
c. Alter
d. None of these
Q. A deadlock exists in the system if and only if the wait for graph:
a. has a cycle in it
b. has a path from first node to last node
c. is a tree
d. none of the above
Q. Rollback of transactions is normally used to:
a. recover from transaction failure
b. update the transaction
c. retrieve old records
d. repeat a transaction
Q. The DBMS language component which can be embedded in a program is
a. The data definition language (DDL).
b. The data manipulation language (DML).
c. The database administrator (DBA).
d. A query language
Q. The statement in SQL which allows to change the definition of a table is
a. Alter.
b. Update.
c. Create.
d. select.