difference between cursor and connection objects

前端 未结 3 1082
面向向阳花
面向向阳花 2020-12-29 21:09

I am confused about why python needs cursor object. I know jdbc and there the database connection is quite intuitive but in python I am confused with cursor object. Also I a

3条回答
  •  一整个雨季
    2020-12-29 21:35

    Connection object is your connection to the database, close that when you're done talking to the database all together. Cursor object is an iterator over a result set from a query. Close those when you're done with that result set.

提交回复
热议问题