更新oracle
sql6 = "UPDATE 表名 set (value)=(:value) where coeffs_id=(:coeffs_id)"
cur_36.prepare(sql6)
cur_36.execute(None, {'value': value, 'coeffs_id': coeffs_id})
conn_36.commit()`
sql語句中常見類型轉換
sql2 = "select cast(community_id as varchar) community_id,sale_count,ppe from 表名 where is_defalt=true "
整數轉換成字符串 :cast(community_id as varchar) 別名
字符串轉換成整數 :cast(community_id as int) 別名
TO_TIMESTAMP_TZ(‘2018-11-11 10:47:16’,‘YYYY-MM-DD HH24:MI:SS’)
to_char(屬性名,格式) 常用於時間轉字符串
to_date(屬性名,格式) 常用於字符串轉日期
參考:https://blog.csdn.net/xiuxiuzhuanshu/article/details/78731075