Explore topic-wise MCQs in Database.

This section includes 25 Mcqs, each offering curated multiple-choice questions to sharpen your Database knowledge and support exam preparation. Choose a topic below to get started.

1.

A function returns one value and has only output parameters.

A. 1
B.
Answer» C.
2.

With the UNION clause, each query involved must output the same number of columns, and they must be UNION compatible.

A. 1
B.
Answer» B.
3.

The UNION clause is used to combine the output from multiple queries together into a single result table.

A. 1
B.
Answer» B.
4.

When AUTOCOMMIT is set on, changes will be made automatically at the end of each SQL statement.

A. 1
B.
Answer» B.
5.

The most frequently used relational operation, which brings together data from two or more related tables into one resultant table, is called an equi-join.

A. 1
B.
Answer» C.
6.

A correlated subquery is where the outer query depends on data from the inner query.

A. 1
B.
Answer» C.
7.

ROLLBACK WORK asks SQL to empty the log file.

A. 1
B.
Answer» B.
8.

The following SQL is which type of join: SELECT CUSTOMER_T. CUSTOMER_ID, ORDER_T. CUSTOMER_ID, NAME, ORDER_ID FROM CUSTOMER_T,ORDER_T WHERE CUSTOMER_T. CUSTOMER_ID = ORDER_T. CUSTOMER_ID

A. Equi-join
B. Natural join
C. Outer join
D. Cartesian join
Answer» B. Natural join
9.

The code to create triggers and routines is stored in only one location and is administered centrally.

A. 1
B.
Answer» B.
10.

Outer join is the same as equi-join, except one of the duplicate columns is eliminated in the result table.

A. 1
B.
C. 1
D.
Answer» C. 1
11.

Which of the following is true concerning systems information in an RDBMS?

A. RDBMS store database definition information in system-created tables.
B. This information can be accessed using SQL.
C. This information often cannot be updated by a user.
D. All of the above.
Answer» E.
12.

How many tables may be included with a join?

A. One
B. Two
C. Three
D. All of the above.
Answer» E.
13.

A transaction is the complete set of closely related update commands that must all be done, or none of them done, for the database to remain valid.

A. 1
B.
C. 1
D.
Answer» B.
14.

The joining technique is useful when data from several relations are to be retrieved and displayed and the relationships are not necessarily nested.

A. 1
B.
Answer» B.
15.

There should be one condition within the WHERE clause for each pair of tables being joined.

A. 1
B.
Answer» B.
16.

Subqueries can be nested multiple times.

A. 1
B.
Answer» B.
17.

Which of the following is true concerning triggers?

A. You do not create them with SQL.
B. They execute against only some applications that access a database.
C. They have an event, condition, and action.
D. They cannot cascade (cause another trigger to fire).
Answer» D. They cannot cascade (cause another trigger to fire).
18.

Embedded SQL is which of the following?

A. Hard-coded SQL statements in a program language such as Java.
B. The process of making an application capable of generating specific SQL code on the fly.
C. Hard-coded SQL statements in a procedure.
D. Hard-coded SQL statements in a trigger.
Answer» B. The process of making an application capable of generating specific SQL code on the fly.
19.

A UNION query is which of the following?

A. Combines the output from no more than two queries and must include the same number of columns.
B. Combines the output from no more than two queries and does not include the same number of columns.
C. Combines the output from multiple queries and must include the same number of columns.
D. Combines the output from multiple queries and does not include the same number of columns.
Answer» D. Combines the output from multiple queries and does not include the same number of columns.
20.

A CASE SQL statement is which of the following?

A. A way to establish an IF-THEN-ELSE in SQL.
B. A way to establish a loop in SQL.
C. A way to establish a data definition in SQL.
D. All of the above.
Answer» B. A way to establish a loop in SQL.
21.

Which of the following statements is true concerning routines and triggers?

A. Both consist of procedural code.
B. Both have to be called to operate.
C. Both run automatically.
D. Both are stored in the database.
Answer» B. Both have to be called to operate.
22.

What type of join is needed when you wish to return rows that do have matching values?

A. Equi-join
B. Natural join
C. Outer join
D. All of the above.
Answer» E.
23.

Triggers are stored blocks of code that have to be called in order to operate.

A. 1
B.
C. 1
D.
Answer» C. 1
24.

Which of the following is one of the basic approaches for joining tables?

A. Subqueries
B. Union Join
C. Natural join
D. All of the above
Answer» E.
25.

What type of join is needed when you wish to include rows that do not have matching values?

A. Equi-join
B. Natural join
C. Outer join
D. All of the above.
Answer» D. All of the above.