SQLite using tutorial 7 to delete a table

Source: Internet
Author: User
Tags sqlite table definition

Http://www.runoob.com/sqlite/sqlite-drop-table.html

SQLite Delete Table

The Drop table statement from SQLite is used to delete the table definition and all its related data, indexes, triggers, constraints, and permission specifications for the table.

Use this command with special care, because once a table is deleted, all information in the table will be lost forever.
Grammar

The basic syntax for the DROP TABLE statement is as follows. You can optionally specify a database name with a table name, as follows:

DROP TABLE Database_name.table_name;

  

Instance

Let's first confirm that the company table already exists, and then we'll remove it from the database.

Sqlite>.tablescompany       Test.company

This means that the company table already exists in the database, then let's remove it from the database as follows:

Sqlite>drop TABLE company;sqlite>

Now, if you try. TABLES command, you will not be able to find the company table:

Sqlite>.tablessqlite>

The display result is empty, which means that the table has been successfully deleted from the database.

SQLite using tutorial 7 to delete a table

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.