oracle存儲blob
發布時間: 2023-06-05 22:54:59
1. Oracle中Blob和Clob的作用
BLOB是用來存儲大量二進制數據的;CLOB用來存儲大量文本數據。
2. python如何保存從oracle資料庫中讀取的BLOB文件
import cx_Oracle
con = cx_Oracle.connect(『username』, 『password』, 『dsn』)
blob_sql = "select column_name from table where clause"
cursor = con.cursor()
cursor.execute(blob_sql)
result = cursor.fetchall()
file = open('file_name', "wb")
file.write(result[0][0].read()) #可以print查看result的內容,根據實際情況read
file.close()
3. oracle表裡有BLOB欄位,存儲的是ZIP文件,如何用資料庫語言導出ZIP文件
create table temp_blob as select &blob_colname from &tbname ;
然後使用exp或者expdp 。
或者你也可以使用第三方編程語言或者軟體來導出。
熱點內容