import cx_Oracle
conn = cx_Oracle.connect('test/test@192.168.168.168/oracledb')
cur1 = conn.cursor()
cur2 = conn.cursor()
cur3 = conn.cursor() sql1 = "select t.* from authentication t"
cur1.execute(sql1)
# res = cur1.fetchmany(4) # 498409
res = cur1.fetchall()
# print(len(res))
s = 15800000000
for i in res:
temp = "'"+i[0]+"'"
print(temp)
s = s + 1
ss = "'"+str(s)+"'"
print(ss)
sql3 = "select t.* from userinfo t wehre t.auth_id = %s"%temp
cur3.execute(sql3)
res = cur3.fetchall()
if len(res)==1:
sql2 = "update userinfo t set t.user_account =%s where t.auth_id=%s"%(ss, temp)
cur2.execute(sql2)
conn.commit()
# conn.commit()
cur3.close()
cur2.close()
cur1.close()
conn.close()