1.11. SQLite delete table

发布时间 :2025-10-25 12:31:15 UTC      

SQLite’s DROP TABLE Statement is used to delete the table definition and all related data, indexes, triggers, constraints, and permission specifications for the table.

Be careful when using this command, because once a table is deleted, all information in the table will be lost forever.

1.11.1. Grammar

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

DROP TABLE database_name.table_name;

1.11.2. Example

Let’s first confirm that the COMPANY table already exists, and then we delete it from the database.

sqlite>.tables
COMPANY       test.COMPANY

This means that the COMPANY table already exists in the database, so let’s delete it from the database as follows:

sqlite>DROP TABLE COMPANY;
sqlite>

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

sqlite>.tables
sqlite>

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

Principles, Technologies, and Methods of Geographic Information Systems  102

In recent years, Geographic Information Systems (GIS) have undergone rapid development in both theoretical and practical dimensions. GIS has been widely applied for modeling and decision-making support across various fields such as urban management, regional planning, and environmental remediation, establishing geographic information as a vital component of the information era. The introduction of the “Digital Earth” concept has further accelerated the advancement of GIS, which serves as its technical foundation. Concurrently, scholars have been dedicated to theoretical research in areas like spatial cognition, spatial data uncertainty, and the formalization of spatial relationships. This reflects the dual nature of GIS as both an applied technology and an academic discipline, with the two aspects forming a mutually reinforcing cycle of progress.