Db2 Mock Test Quiz

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Sharmiladevi
S
Sharmiladevi
Community Contributor
Quizzes Created: 4 | Total Attempts: 8,661
| Attempts: 750 | Questions: 10
Please wait...
Question 1 / 10
0 %
0/100
Score 0/100
1. SUBSTR(CUSTNAME,1,3) will extract 1st 3 character from CUSTNAME string

Explanation

The statement is true because the SUBSTR function is used to extract a substring from a given string. In this case, the function will extract the first 3 characters from the CUSTNAME string.

Submit
Please wait...
About This Quiz
Db2 Quizzes & Trivia

This db2 mock test Quiz assesses knowledge on key database concepts, including entity integrity, SQL error codes, and functions like MAX and SUBSTR. It's designed to evaluate understanding of DB2 system functionalities and SQL execution, crucial for database professionals.

Personalize your quiz and earn a certificate with your name on it!
2. . SQLCODE -922 is for authorization failure

Explanation

SQLCODE -922 is indeed for authorization failure. In SQL, authorization failure occurs when a user attempts to perform an operation for which they do not have the necessary privileges or permissions. When this happens, the SQLCODE -922 is returned, indicating that the authorization has failed. This error code helps in identifying and troubleshooting authorization-related issues in SQL queries or database operations.

Submit
3. Which of the following DB2 objects allows multiple users to access data in a table with each only being able to access certain portions of the data?

Explanation

Views in DB2 allow multiple users to access data in a table with each user only being able to access certain portions of the data. Views are virtual tables that are based on the underlying tables and can be used to restrict or filter the data that is visible to different users. By defining specific criteria or conditions in the view, different users can be granted access to only the data that meets those criteria, providing a level of security and control over the data.

Submit
4. The final result of a DB2 BIND is

Explanation

The final result of a DB2 BIND is a DB2 (application) Plan. During the BIND process, the application program is linked with the DB2 system, and a plan is created. The plan contains information about the access path and optimization for executing the SQL statements in the application program. The plan is then stored in the DB2 catalog, which is a system database that contains metadata about the DB2 system and its objects. The plan is used by the DB2 system to execute the SQL statements efficiently when the application program is run.

Submit
5. We Can use MAX on a CHAR column

Explanation

The statement is true because in some databases, such as MySQL, we can use the MAX function on a CHAR column. The MAX function is used to find the maximum value in a column, and it can be applied to different data types, including CHAR. When applied to a CHAR column, the MAX function will return the maximum value based on the character's ASCII value.

Submit
6. What does a positive value of SQL code mean?

Explanation

A positive value of SQL code typically indicates successful execution. When a SQL statement is executed successfully, it returns a positive value to indicate that the operation was completed without any errors. This means that the query or command was processed correctly and the desired operation was successfully performed on the database.

Submit
7. ENTITY INTEGRITY is a state where column that is part of a primary key can have null values.                 

Explanation

Entity integrity refers to the rule that states that the primary key of a table must have a unique value and cannot be null. Therefore, a column that is part of a primary key cannot have null values. Since the statement in the question contradicts this rule, the correct answer is False.

Submit
8. Which one of the following is NOT a DB2 object?

Explanation

A column is not considered a DB2 object because it is not an independent entity within the database. It is a component of a table, which is a DB2 object. A column represents a specific attribute or field within a table and cannot exist on its own. Therefore, it is not classified as a separate DB2 object.

Submit
9. Every SQL statement is executable.

Explanation

The statement "Every SQL statement is executable" is false. While most SQL statements are executable, there are some statements that are not meant to be executed directly, such as comments or statements that define database objects. These non-executable statements are used for documentation or as part of the database schema, but they are not intended to be executed as part of a query or transaction. Therefore, not every SQL statement is executable.

Submit
10. AUTOMATIC RECOMPILATION occurs when

Explanation

Automatic recompilation occurs when either an existing index is dropped or a new index is created. In both cases, the database management system automatically recompiles the affected objects to ensure the integrity and consistency of the data. This process is necessary to update the execution plans and optimize the performance of queries that depend on the dropped or newly created index.

Submit
View My Results

Quiz Review Timeline (Updated): Mar 22, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 22, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Jul 28, 2011
    Quiz Created by
    Sharmiladevi
Cancel
  • All
    All (10)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
SUBSTR(CUSTNAME,1,3) will extract 1st 3 character from CUSTNAME string
. SQLCODE -922 is for authorization failure
Which of the following DB2 objects allows multiple users to access...
The final result of a DB2 BIND is
We Can use MAX on a CHAR column
What does a positive value of SQL code mean?
ENTITY INTEGRITY is a state where column that is part of a primary key...
Which one of the following is NOT a DB2 object?
Every SQL statement is executable.
AUTOMATIC RECOMPILATION occurs when
Alert!

Advertisement