A connector is employed when we have to use MySQL with other programming languages. The work of MySQL-connector is to provide access to MySQL Driver to the required language. Thus, it generates a connection between the programming language and the MySQL Server.
Drop Table Command
Drop command affects the structure of the table and not data. It is used to delete an already existing table. For cases where you are not sure if the table to be dropped exists or not DROP TABLE IF EXISTS command is used. Both cases will be dealt with in the following examples.
DROP TABLE tablename; DROP TABLE IF EXISTS tablename;
The following programs will help you understand this better.
Tables before drop:
Example 1: Program to demonstrate drop if exists. We will try to drop a table which does not exist in the above database.
Example 2: Program to drop table Geeks
- Python: MySQL Create Table
- Python MySQL - Insert into Table
- Connect MySQL database using MySQL-Connector Python
- Python | Pandas Index.drop()
- Python - Channel Drop using Pillow
- Python | Pandas Series.drop()
- Drop Collection if already exists in MongoDB using Python
- Python | Drop-down list in kivy using .kv file
- MongoDB python | Delete Data and Drop Collection
- Python | Delete rows/columns from DataFrame using Pandas.drop()
- Python MySQL - Join
- Python MySQL - Where Clause
- MySQL-Connector-Python module in Python
- Python MySQL - Delete Query
- Python MySQL - Limit Clause
- Python MySQL - Select Query
- Python MySQL - Order By Clause
- Python MySQL - Update Query
- Python MySQL - Create Database
- How to install MySQL connector package in Python?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.