Interface Python with SQL || Preeti Arora || Class 12 || Unsolved Question || Computer science || Solution



Q1. Explain the following 'results' retrieval methods with examples.

A. fetchone ()
B. rowcount ()
C. fetchall ()




Q2. What is the significance of connecting Python with MySQL?



Q3. Why do we use connect () function?




Q4. Explain the steps for establishing MySQL connection with Python.



Q5. Explain the transaction keywords used with MySQL-Python connectivity.



Q6. Give the significance of using execute () function.



Q7. Differentiate between commit () and rollback () statements.



Q8. Which function is used to connect to database?



Q9. Which function is used to run the SQL query?



Q10. Which function is used to read one record from the database?




Q11. Write a program to display all records in ascending order of their salary.



Q12. Write a program to increase salary of the employee, whose name is "MANOJ KUMAR", by 3000.



Q13. Write a program to delete the employee record whose name is read from keyboard at execution time.




Q14. Create a database TESTDB.

• Create a table EMPLOYEE with Fields FIRST_NAME, LAST_NAME, AGE, SEX and INCOME in TESTDB.

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post