Javatpoint Logo
Javatpoint Logo

SQLite Drop Table

In SQLite, DROP TABLE statement is used to remove a table definition and all associated data, indexes, triggers, constraints and permission specifications associated with that table.

Syntax:

Note: You must be very careful while using the DROP TABLE command because once the table is deleted then all the information available in the phone is destroyed and you cannot recover.

Let's take an example to demonstrate how to delete a table in SQLite.

We have already two tables "DEPARTMENT" and "STUDENT". We can verify it by using .tables command.

SQLite Drop table 1

So you can see that we have two tables.

Let's delete the "STUDENT" table.

SQLite Drop table 2

You can verify it by using .tables command.

SQLite Drop table 3

You can see only one table is here in the database. It means the other table is dropped.






Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


B.Tech / MCA