加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

oracle-sqldeveloper – 如何在oracle sql developer中导出clob

发布时间:2020-12-12 13:08:05 所属栏目:百科 来源:网络整理
导读:如何在oracle sql developer中导出clob字段数据.目前clob字段数据无法在oracle sql开发人员中导出. 如果你不想(或不能) export and import你的数据,并且真的想要它作为一组插入语句,你可以使用SQL Developer的内置格式化工具自动将你的CLOB拆分成多个足够小
如何在oracle sql developer中导出clob字段数据.目前clob字段数据无法在oracle sql开发人员中导出. 如果你不想(或不能) export and import你的数据,并且真的想要它作为一组插入语句,你可以使用SQL Developer的内置格式化工具自动将你的CLOB拆分成多个足够小的块.作为字符串文字有效,然后将结果假脱机到文件:
spool clob_export.sql
select /*insert*/ * from your_table;
spool off

使用更新的版本,您可以使用the sqlformat command来控制输出格式,而无需修改查询;这相当于:

set sqlformat insert
spool clob_export.sql
select * from your_table;
spool off

生成的insert语句如下所示:

REM INSERTING into YOUR_TABLE
SET DEFINE OFF;
Insert into YOUR_TABLE (ID,CLOB_COLUMN) values (1,TO_CLOB('... up to 4k of characters with quotes escaped ...')
|| TO_CLOB('... up to 4k of characters with quotes escaped ...')
|| TO_CLOB('... up to 4k of characters with quotes escaped ...')
...
|| TO_CLOB('... up to 4k of characters with quotes escaped ...'));

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读