Rdbms And SQL Knowledge Test

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 Alfredhook3
A
Alfredhook3
Community Contributor
Quizzes Created: 2924 | Total Attempts: 2,320,036
Questions: 10 | Attempts: 1,270

SettingsSettingsSettings
Rdbms And SQL Knowledge Test - Quiz

Welcome to the RDBMS and SQL Knowledge Test. As you might already know, RDMS is the basis for various modern database systems such as SQL, MySQL, MS SQL Server, IBM DB2. Etc. In this quiz, you will be asked questions about the relational database management system and SQL programming. Let's see if you can pass this test or not.


Questions and Answers
  • 1. 

    Which data manipulation command is used to combines the records from one or more tables?

    • A.

      SELECT

    • B.

      PROJECT

    • C.

      JOIN

    • D.

      PRODUCT

    Correct Answer
    C. JOIN
    Explanation
    The JOIN command is used to combine the records from one or more tables. It allows you to retrieve data from multiple tables based on a related column between them. This command is commonly used in database management systems to perform data manipulation and retrieve information from multiple tables simultaneously.

    Rate this question:

  • 2. 

    Which of the following is a valid SQL type?

    • A.

      DECIMAL

    • B.

      NUMERIC

    • C.

      FLOAT

    • D.

      All of the above

    Correct Answer
    D. All of the above
    Explanation
    Numeric: These are numeric data types used to store fixed-point numbers. They are typically used for representing numbers with a specific precision and scale.
    Float: This is a floating-point numeric data type used to store approximate numeric values with a floating decimal point.
    Character: This is a character string data type used to store text or character data.
    Therefore, all the types mentioned in the options— numeric, float, and character—are valid SQL data types.

    Rate this question:

  • 3. 

    Which operator is used to compare a value to a specified list of values?

    • A.

      BETWEEN

    • B.

      ANY

    • C.

      IN

    • D.

      ALL

    Correct Answer
    C. IN
    Explanation
    The operator "IN" is used to compare a value to a specified list of values. It checks if the value matches any of the values in the specified list.

    Rate this question:

  • 4. 

    Is [ SQL permits attribute names to be repeated in the same relation.  ] true or false?

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    SQL does not permit attribute names to be repeated in the same relation. Each attribute in a table must have a unique name to avoid ambiguity and ensure proper data organization.

    Rate this question:

  • 5. 

    Is [ A SQL query automatically eliminates duplicates  ? ] true or false?

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
    Explanation
    False. A SQL query does not automatically eliminate duplicates. If a query retrieves data from a table that contains duplicate rows, all the duplicate rows will be returned. To eliminate duplicates, the DISTINCT keyword can be used in the SELECT statement to retrieve only unique values.

    Rate this question:

  • 6. 

    Which SQL function is used to count the number of rows in a SQL query?

    • A.

      COUNT()

    • B.

      NUMBER()

    • C.

      SUM()

    • D.

      COUNT(*)

    Correct Answer
    D. COUNT(*)
    Explanation
    The COUNT(*) function is used to count the number of rows in a SQL query. It returns the number of rows that match the specified condition in the query. The asterisk (*) in COUNT(*) indicates that all rows in the result set should be counted. This function is commonly used to get the total number of records in a table or to count the number of rows that meet certain criteria in a query.

    Rate this question:

  • 7. 

    Which SQL keyword is used to retrieve a maximum value?

    • A.

      MOST

    • B.

      TOP

    • C.

      MAX

    • D.

      UPPER

    Correct Answer
    C. MAX
    Explanation
    The SQL keyword "MAX" is used to retrieve the maximum value from a column in a database table. It is commonly used with the "SELECT" statement to find the highest value in a specific column. For example, "SELECT MAX(salary) FROM employees" would return the highest salary in the "employees" table. The "MOST", "TOP", and "UPPER" keywords are not used for retrieving maximum values in SQL.

    Rate this question:

  • 8. 

    ___________removes all rows from a table without logging the individual row deletions.

    • A.

      DELETE

    • B.

      REMOVE

    • C.

      DROP

    • D.

      TRUNCATE

    Correct Answer
    D. TRUNCATE
    Explanation
    TRUNCATE removes all rows from a table without logging the individual row deletions. This means that the operation is faster compared to DELETE, as it does not generate individual delete statements for each row. TRUNCATE also resets the identity column value (if any) and releases the storage space used by the table, making it more efficient for large data sets. However, it cannot be rolled back and does not trigger any delete triggers associated with the table.

    Rate this question:

  • 9. 

    Which of the following is not a DDL command?

    • A.

      UPDATE

    • B.

      TRUNCATE

    • C.

      ALTER

    • D.

      None of the Mentioned

    Correct Answer
    A. UPDATE
    Explanation
    UPDATE is not a Data Definition Language (DDL) command. DDL commands are used to define or modify the structure of the database, such as creating or altering tables, indexes, or views. UPDATE, on the other hand, is a Data Manipulation Language (DML) command used to modify data within the tables. Therefore, UPDATE is not a DDL command.

    Rate this question:

  • 10. 

    Which of the following are TCL commands?

    • A.

       UPDATE and TRUNCATE

    • B.

      SELECT and INSERT

    • C.

      GRANT and REVOKE

    • D.

      ROLLBACK and SAVEPOINT

    Correct Answer
    D. ROLLBACK and SAVEPOINT
    Explanation
    The correct answer is ROLLBACK and SAVEPOINT. These are both TCL (Transaction Control Language) commands in SQL. ROLLBACK is used to undo changes made in a transaction, while SAVEPOINT is used to mark a point in a transaction to which it can be rolled back later. UPDATE and TRUNCATE are DML (Data Manipulation Language) commands, SELECT and INSERT are also DML commands, and GRANT and REVOKE are DDL (Data Definition Language) commands.

    Rate this question:

Quiz Review Timeline +

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

  • Current Version
  • Nov 12, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Jan 22, 2021
    Quiz Created by
    Alfredhook3

Related Topics

Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.