Hope some one can help me, I would like to copy rows in same table and that table has relation to another table that I have to copy related row accordingly: Table1 I copied rows with table0Id = 3 Table1 I would like to do the same to Table2 depending to the Table1 Ids like this: Table2 Table2 As you
Tag: rows
Python: Number of rows affected by cursor.execute(“SELECT …)
How can I access the number of rows affected by: Answer Try using fetchone: result will hold a tuple with one element, the value of COUNT(*). So to find the number of rows: Or, if you’d rather do it in one fell swoop: PS. It’s also good practice to use parametrized arguments whenever possible, because it can automatically quote arguments