Summary

In this chapter, we have covered the MySQL INSERT command and how to implement it in Python. In particular, we have seen how to form INSERT statements and pass them to MySQL through MySQLdb. Using Python, we also looked at how to use user-defined variables in MySQL statements, changing the INSERT statement dynamically. In the next chapter, we will look at how to handle MySQL errors.

Get MySQL for Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.