Prerequisite: Python: MySQL Create Table
In this article, we are going to see how to get the size of a table in MySQL using Python. Python allows the integration of a wide range of database servers with applications. A database interface is required to access a database from Python. MySQL Connector-Python module is an API in python for communicating with a MySQL database.
Approach:
- Import module.
- Make a connection request with the database.
- Create an object for the database cursor.
- Execute the following MySQL query:
DELETE FROM TABLE_NAME WHERE Column Name = 'Value';
Example 1:
In this example we are using this database table with the following query;