Page 60 - SQL
P. 60

Chapter 16: DROP Table




        Remarks



        DROP TABLE removes the table definition from the schema along with the rows, indexes,
        permissions, and triggers.


        Examples



        Simple drop


         Drop Table MyTable;



        Check for existence before dropping


        MySQL3.19

         DROP TABLE IF EXISTS MyTable;


        PostgreSQL8.x

         DROP TABLE IF EXISTS MyTable;


        SQL Server2005


         If Exists(Select * From Information_Schema.Tables
                   Where Table_Schema = 'dbo'
                     And Table_Name = 'MyTable')
           Drop Table dbo.MyTable


        SQLite3.0


         DROP TABLE IF EXISTS MyTable;


        Read DROP Table online: https://riptutorial.com/sql/topic/1832/drop-table
























        https://riptutorial.com/                                                                               42
   55   56   57   58   59   60   61   62   63   64   65