Db2 Mock Test Quiz

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Sharmiladevi
S
Sharmiladevi
Community Contributor
Quizzes Created: 4 | Total Attempts: 8,418
Questions: 10 | Attempts: 723

SettingsSettingsSettings
Mock Test Quizzes & Trivia

Questions and Answers
  • 1. 

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

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    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.

    Rate this question:

  • 2. 

    . SQLCODE -922 is for authorization failure

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    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.

    Rate this question:

  • 3. 

    We Can use MAX on a CHAR column

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    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.

    Rate this question:

  • 4. 

    Every SQL statement is executable.

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    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.

    Rate this question:

  • 5. 

    SUBSTR(CUSTNAME,1,3) will extract 1st 3 character from CUSTNAME string

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
    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.

    Rate this question:

  • 6. 

    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?

    • A.

      Views

    • B.

      Aliases

    • C.

      Indexes

    Correct Answer
    A. Views
    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.

    Rate this question:

  • 7. 

    Which one of the following is NOT a DB2 object?

    • A.

      Synonym

    • B.

      Table

    • C.

      Column

    Correct Answer
    C. Column
    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.

    Rate this question:

  • 8. 

    What does a positive value of SQL code mean?

    • A.

      Error

    • B.

      Successful execution

    • C.

      No rows found

    Correct Answer
    B. Successful execution
    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.

    Rate this question:

  • 9. 

    AUTOMATIC RECOMPILATION occurs when

    • A.

      A existing index is dropped.

    • B.

      A new index is created.

    • C.

      Both (A) and (B).

    Correct Answer
    C. Both (A) and (B).
    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.

    Rate this question:

  • 10. 

    The final result of a DB2 BIND is

    • A.

      Data Base Request Module

    • B.

      DB2 (application) Plan

    • C.

      DB2 catalog

    Correct Answer
    B. DB2 (application) Plan
    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.

    Rate this question:

Related Topics

Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.