python 3.x - what is the difference between cur.execute and con.execute? -


In the Python Manual :.

In some code: cur.execute (sqlite command), there are some code in: con.execute (sqlite command),

What is the difference between them? From Docs for

connection (see):

Execute (SQL [, parameters]) This is a nonstandard shortcut that creates an intermediate cursor object by calling the cursor method, then implementing the cursor with the parameter given parameter.

Then to answer your question: It just creates a new cursor and implements your statement. This new cursor

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -