exp中query参数使用

test用户下有tb1表
SQL> select * from tb1;

        ID NAME
---------- ----------
         1 A
         2 B
         3 C
        10 D
1)导出所有数据
C:\>exp test/test file=e:\a.dmp tables=tb1

Export: Release 10.2.0.1.0 - Production on 星期一 6月 23 14:55:30 2014

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集

即将导出指定的表通过常规路径...
. . 正在导出表                             TB1导出了           4 行
成功终止导出, 没有出现警告。

2)导出id<3的数据
C:\>exp test/test file=e:\a.dmp tables=tb1 query="""where id<3"""

Export: Release 10.2.0.1.0 - Production on 星期一 6月 23 14:59:38 2014

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集

即将导出指定的表通过常规路径...
. . 正在导出表                             TB1导出了           2 行
成功终止导出, 没有出现警告。

注意:在windows系统中,需要在where语句的两端使用三个双引号
linux中 query=\"where id\<3\"

3)使用parfile参数定义一个文件,可以不考虑操作系统平台
 query.par
   query="where id<3"
C:\>exp test/test file=e:\a.dmp tables=tb1 parfile=e:\query.par

Export: Release 10.2.0.1.0 - Production on 星期一 6月 23 15:04:26 2014

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集

即将导出指定的表通过常规路径...
. . 正在导出表                             TB1导出了           2 行
成功终止导出, 没有出现警告。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26937943/viewspace-1192137/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26937943/viewspace-1192137/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值