Create Table In MySQL Python:
(1) You have to open the Xampp control panel and press the Apache and MySQL start button. If Apache and MySQL are highlighted in green color it means they start working. Now open your browser and type “http://localhost/phpmyadmin/“. [Follow this blog for all these steps- Create MySQL Database and Connection in Python].
We can use the PyCharm code editor for this example. If you do not know about it then follow this link- How to install PyCharm for Python and create a program in it. |
(2) In order to create a table in MySQL Python write the following code as shown below.

(3) Now open localhost/phpmyadmin in the browser and click on the employee database, you see that the employee_table is created as shown below.

(4) Now click on the employee_table, and you see the fields which we have created as shown below.

(5) If you click on the structure tab then you see the table structure as shown below.

Tutorial Python Tutorial MySQL Email (Electronic Mail) Operating System (OS) Computer Network Database Models or Data Models Python Built-in Exceptions– Official Docs |
Comments (No)