当前位置:首页 > 数据库 > Oracle

python更新数据库oracle中的datetime类型的数据,带参数


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   

本文系统来源:https://www.cnblogs.com/zz-1021/p/13810544.html


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!

相关教程推荐

其他课程推荐