Question

    Which of the following SQL queries is used to remove a table from a database?

    A DELETE Correct Answer Incorrect Answer
    B DROP Correct Answer Incorrect Answer
    C TRUNCATE Correct Answer Incorrect Answer
    D ALTER Correct Answer Incorrect Answer
    E REMOVE Correct Answer Incorrect Answer

    Solution

    The DROP statement is used to permanently remove a table from the database. When a table is dropped, the table structure, along with its data, is deleted, and it cannot be recovered. a) DELETE : DELETE is used to remove rows from a table, not the table structure itself. c) TRUNCATE : TRUNCATE removes all rows from a table but retains the table structure. d) ALTER : ALTER is used to modify the structure of an existing table, not remove it. e) REMOVE : REMOVE is not a valid SQL command.

    Practice Next