博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
import和export使用
阅读量:4703 次
发布时间:2019-06-09

本文共 1640 字,大约阅读时间需要 5 分钟。

  1. 增加数据
    Import from aaa.del of del messages msg.out insert into product
    Import from aaa.del of del messages msgout insert into product(price,prod_no,description)
    2. 更新已经存在的数据及加入新数据
    Import from aaa.del of del messages msg.out replace into product
    3. 替换数据
    Import from aaa.del of del messages msg.outreplace_create into product
    4. 创建表
    Import from aaa.ixf of ixf messages msg.outreplace_create into product
    5. commitcount与restartcount选项
    import from myfile.ixf of ixfcommitcount 500 messages msg.out insert into newtable
    import from myfile.ixf of ixfcommitcount 50 restartcount 2000 messages msg.out insert into newtable
    6. 导入大对象

 

例一:Export to myname.del of del select * from myname

格式:export to x.ixf of ixf … select * from X…
例二
db2 export to org.del of del modified by chardel! coldel@ codepage=1208 select * from org
字符串由感叹号!括起来,列由@号定界,字符串被转换成代码页1208
例二
db2 export to org.del of del modified by chardel! coldel@ codepage=1208 messages msg.out select * from org
字符串由感叹号!括起来,列由@号定界,字符串被转换成代码页1208,添加message参数后,产生一个msg.out文件,捕获导出期间错误,警告和信息性消息。
例三
导出大对象
Export to file_name of file_type lobs to lobfile_directory,lobfile_directory_2,….
Lobfilelobfilename
Modified by lobsinfileselect_statment
有了lobsinfile修饰符,export实用程序就查找lobs to 子句中指定的目录,然后将lob数据放在那里。如果没有找到lobs to 子句,就将lob数据发送到当前工作目录。
例四
CONNECT TO SAMPLE;
EXPORT TO "E:/db2log/org.ixf" OF IXF METHOD N (DEPTNUMB, DEPTNAME) MESSAGES "E:/db2log/msg.out" SELECT * FROM ADMINISTRATOR.ORG;
CONNECT RESET;
例五
CONNECT TO SAMPLE;
EXPORT TO "E:/db2log/org1.ixf" OF IXF MESSAGES "E:/db2log/msg1.out" SELECT * FROM ADMINISTRATOR.ORG;
CONNECT RESET;

转载于:https://www.cnblogs.com/wuquelin/articles/3089899.html

你可能感兴趣的文章
修改node节点名称
查看>>
PAT(B) 1014 福尔摩斯的约会(Java)
查看>>
PAT甲级题解-1123. Is It a Complete AVL Tree (30)-AVL树+满二叉树
查看>>
项目开发总结报告(GB8567——88)
查看>>
SSH加固
查看>>
端口扫描base
查看>>
iOS IM开发的一些开源、框架和教程等资料
查看>>
FansUnion:共同写博客计划终究还是“流产”了
查看>>
python 二维字典
查看>>
pip 警告!The default format will switch to columns in the future
查看>>
Arrays类学习笔记
查看>>
实验吧之【天下武功唯快不破】
查看>>
2019-3-25多线程的同步与互斥(互斥锁、条件变量、读写锁、自旋锁、信号量)...
查看>>
win7-64 mysql的安装
查看>>
dcm4chee 修改默认(0002,0013) ImplementationVersionName
查看>>
maven3在eclipse3.4.2中创建java web项目
查看>>
发布时间 sql语句
查看>>
黑马程序员 ExecuteReader执行查询
查看>>
记一些从数学和程序设计中体会到的思想
查看>>
题目1462:两船载物问题
查看>>