Skip to content
Advertisement

Tag: pypyodbc

python how to write an update sql query?

I am trying to write an update query but I could not manage the string. My connections is ok. My query is like this: This is giving me error: undefined column name ‘hello’. I want to update message column as hello but it is getting it as a column name. In sql, when I write it as UPDATE users SET

Can python cursor.execute accept multiple queries in one go?

Can the cursor.execute call below execute multiple SQL queries in one go? I don’t have python setup yet but want to know if above form is supported by cursor.execute? Answer Multiple SQL statements in a single string is often referred to as an “anonymous code block”. There is nothing in pyodbc (or pypyodbc) to prevent you from passing a string

Advertisement