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

Python/SQL/pydobc: Get result of if operation for counter?

I’m running the following code to add emails to a database table if they do not already exist. I’d like to be able to count the emails that are added and the ones that already existed. I’ve tried checking the cursor.description after each loop, but it returns None whether the item existed or not. Is there a way to do

Advertisement