Unit-2 Experiments
- Due No Due Date
- Points 0
- Submitting a file upload
Experiment: 2 Python Program - MySQL Database (Complete the below tasks)
1. Write a Python program to create a MySQL database and connect with the database and print the version of the MySQL database.
2. Write a Python program to connect a database and create a MySQL table within the database.
3. Write a Python program to list the tables of a given MySQL database file.
4. Write a Python program to create a table and insert some records in that table. Finally selects all rows from the table and display the records.
5. Write a Python program to insert a list of records into a given MySQL table.
6. Write a Python program to insert values to a table from user input.
7. Write a Python program to count the number of rows of a given MySQL table.
8. Write a Python program to update a specific column value of a given table and select all rows before and after updating the said table.
9. Write a Python program to update all the values of a specific column of a given MySQL table.
10. Write a Python program to delete a specific row from a given MySQL table.
11. Write a Python program to alter a given MySQL table.
Reference: https://www.w3resource.com/python-exercises/MySQL/index.php
Submission Note:
1) Submit the Word File of the screenshot of the code
2) Submit all .py/.ipynb files here as the attachment.