Any2Quiz
CBSE / 10 / Computer Science / Database Concepts

Basic SQL Commands Quiz - CBSE Class 10 Computer Science

Free practice quiz: Basic SQL Commands (CBSE Class 10 Computer Science). 18 multiple-choice questions with answers and explanations. Play online, no sign-up needed.

Play all 18 questions free

Sample questions

  1. Which SQL command is used to retrieve data from a database?

    1. SELECT
    2. INSERT
    3. DELETE
    4. UPDATE
    Show answer

    Answer: A. SELECT

    The SELECT command is used to retrieve data from a database. It allows you to specify which columns of data you want to display.

  2. How do you update a single column in SQL?

    1. UPDATE table_name SET column=value WHERE condition;
    2. CHANGE table_name column=value;
    3. SET column=value IN table_name WHERE condition;
    4. MODIFY table_name SET column=value;
    Show answer

    Answer: A. UPDATE table_name SET column=value WHERE condition;

    The UPDATE command is used in SQL to change existing data. The SET clause specifies the column to change and the WHERE clause specifies which rows should be updated.

  3. What does the COUNT() function do?

    1. Counts the number of rows
    2. Calculates the sum of a column
    3. Finds the average value of a column
    4. Returns the first row
    Show answer

    Answer: A. Counts the number of rows

    The COUNT() function is used to count the number of rows returned by a query.

  4. Which command is used to change the structure of a table?

    1. ALTER TABLE
    2. MODIFY TABLE
    3. UPDATE TABLE
    4. CHANGE TABLE
    Show answer

    Answer: A. ALTER TABLE

    The ALTER TABLE command is used to add, delete, or modify columns in an existing table.

  5. Which command is used to remove a table and the data within it permanently?

    1. DROP TABLE
    2. TRUNCATE TABLE
    3. DELETE TABLE
    4. REMOVE TABLE
    Show answer

    Answer: A. DROP TABLE

    The DROP TABLE command permanently removes a table, along with all of its data, from the database.

Take the full quiz

More quizzes

Browse all Database Concepts quizzes