python操作oracle实现BLOB字段的读写
< 返回列表时间: 2020-07-02来源:OSCHINA
小白的进阶之路总是充满着荆棘
假设表结构: create table test
(
zp blob;
id varchar2(30)
)
python读取操作: sql = "select zp from test" cr.execute(sql) result = type(cr.fetcharr().read()) print(result)
python写入操作: sql = "insert into test(zp) values(:blobData)" cr.setinputsizes(blobData=cx_Oracle.BLOB)
热门排行