我在Python中使用psycopg2来使用Postgresql,但是我不确定如何使用"select for update“查询来使用它。除了psycopg2之外,我还可以使用其他东西。如何使用Python创建postgresql select for update查询?
发布于 2018-02-09 00:05:05
psycopg2只是执行您发送给execute方法的字符串中的sql。您只需将select for update放在查询中,就像在其他任何地方一样。
cursor.execute("""select * from some_table for update""")https://stackoverflow.com/questions/48680132
复制相似问题