Fill In The Blanks On SQL

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 Aparnasunil75
A
Aparnasunil75
Community Contributor
Quizzes Created: 20 | Total Attempts: 36,067
Questions: 10 | Attempts: 893

SettingsSettingsSettings
SQL Quizzes & Trivia

SQL


Questions and Answers
  • 1. 

    ............ command is used to make changes in the structure of a table.

    Explanation
    The "Alter table" command is used to make changes in the structure of a table. It allows users to add or delete columns, modify the data type or size of existing columns, rename columns or the table itself, and add or drop constraints on the table. This command is commonly used in database management systems to modify the structure of tables according to the evolving needs of an application or system.

    Rate this question:

  • 2. 

    ............ means number of columns in the relation

    Explanation
    The term "degree" in the context of a relation refers to the number of columns or attributes in that relation. It represents the horizontal dimension of the relation, indicating the number of distinct properties or characteristics associated with each tuple or row in the relation. Therefore, "degree" is the appropriate term to describe the number of columns in a relation.

    Rate this question:

  • 3. 

    ............ indicates the restrictions imposed on the values of an attribute.

    Explanation
    Constraints are used to impose restrictions on the values of an attribute in a database. They ensure that the data entered into the attribute meets certain criteria or rules. Constraints can be used to enforce data integrity, such as ensuring that a certain attribute cannot be null or that it must be unique. They can also be used to define relationships between tables or to restrict the range of values that can be entered into an attribute. In this case, the correct answer "Constraint" accurately describes the concept of restrictions imposed on the values of an attribute.

    Rate this question:

  • 4. 

    Cardinality is number of .......... in the relation.

    Explanation
    Cardinality refers to the number of tuples in a relation. In a relational database, a tuple represents a single row or record in a table. Therefore, the correct answer is "tuple" because the cardinality of a relation is determined by the number of tuples it contains.

    Rate this question:

  • 5. 

    ........... clause is used to remove duplicate rows of a table.

    Explanation
    The "Distinct" clause is used to remove duplicate rows of a table. It is commonly used in SQL queries to retrieve unique values from a column or set of columns. When the "Distinct" keyword is included in a query, it ensures that only distinct or unique rows are returned in the result set. This can be useful when you want to eliminate duplicate data and focus on unique records.

    Rate this question:

  • 6. 

    .......... command is used to change the values of tuples of a table.

    Explanation
    The update command is used to change the values of tuples in a table. It allows for modifying existing data in a table by specifying the new values for certain columns or fields. This command is commonly used in database management systems to update records and make changes to the data stored in tables.

    Rate this question:

  • 7. 

    Ascending order is default sort order of .............. clause.

    Explanation
    The ascending order is the default sort order of the "order by" clause. This means that if no specific sort order is specified, the query will sort the results in ascending order.

    Rate this question:

  • 8. 

    .............. clause is used to select specific rows in a table.

    Explanation
    The "Where" clause is used to select specific rows in a table based on a specific condition or criteria. It allows you to filter the data and retrieve only the rows that meet the specified condition. By using the "Where" clause, you can narrow down the result set and extract the desired information from the table.

    Rate this question:

  • 9. 

    All columns that participate in the primary key must be defined as ...............

    Explanation
    All columns that participate in the primary key must be defined as "not null" because the primary key is a unique identifier for each record in a table. It ensures that each row has a unique value for the primary key column and that it cannot be null or empty. By requiring the primary key columns to be "not null," it guarantees the integrity and uniqueness of the data in the table, allowing for efficient retrieval and manipulation of records.

    Rate this question:

  • 10. 

    .............. command lists names of all the tables within a database.

    Explanation
    The "show tables" command is used to display the names of all the tables within a database. It allows users to see a list of the tables present in the database, which can be helpful for various purposes such as checking the structure of the database or referencing specific tables for queries or operations.

    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
  • Mar 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Mar 04, 2020
    Quiz Created by
    Aparnasunil75

Related Topics

Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.