时间:2021-07-01 10:21:17 帮助过:119人阅读
import cx_Oracle
conn = cx_Oracle.connect(‘数据库名字‘, ‘密码‘, ‘**‘, encoding=‘UTF-8‘)
cursor = conn.cursor()
number = ‘2020-09-08 11:29:18‘
cursor.execute("update table set DATEcolumn = to_date(‘{number}‘ ,‘yyyy-mm-dd hh:mi:ss‘)".format(number=number))
conn.commit()
cursor.close()
conn.close()
python更新数据库oracle中的datetime类型的数据,带参数
标签:bsp odi column 数据 tab format oracle enc port