Tutorials Hut

  • SQL Testing




  • SQL - Drop Table Statement

    • Remove or delete a table from the SQL database.
    • Child tables should also be dropped before dropping any table otherwise it can’t be dropped due to its integrity.

    Syntax

    DROP TABLE table_name;

    Example

    Below is the Student Table.

    Let us Drop this student table.

    mysql> Drop Table Student;
    Query OK, 0 rows affected (0.98 sec) 
    SQL Drop Table Statement

    We will get below error if we’ll  try DESC command.

    mysql> Desc Student;
    ERROR 1146 (42S02): Table 'testing.student' doesn't exist

     Please note we are using testing data base here.

    Recommended Articles:



  • SQL Testing


















  • Leave a Reply

    Your email address will not be published. Required fields are marked *