describe connection.cursor() and corsor.execute in sql, give me simple explanation.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hey there! 👋
If you’re just getting started with Python and SQL, this tutorial might help: https://www.digitalocean.com/community/tutorials/python-sqlite3
To this specific quesiton:
connection.cursor()
creates a cursor object, which lets you interact with the database.cursor.execute()
runs a SQL query — for example, inserting or selecting data.- Bobby