The statement I want to use is the following:
UPDATE table SET colum1 = 1 WHERE colum2 LIKE '%gasse%';
when I use exactly this statement everything containing gasse
gets updated but when I do this in python with Psycopg2:
sqlstring = """UPDATE table SET colum1 = 1 WHERE colum2 LIKE '%gasse%';"""
cur.execute(sqlstring)
colum1 does not get updated have i done something wrong did i not escape something correctly?
It is necessary to commit
the transaction that is automatically opened by Psycopg before the first command
connection.commit()
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加