如何导出oracle数据库中表的数据

2025-02-24 06:02:37
推荐回答(2个)
回答1:

还有数据的导入先要知道么。
数据的导入
1
将d:\daochu.dmp
中的数据导入
test数据库中。
imp
system/manager@test
file=d:\daochu.dmp
上面可能有点问题,因为有的表已经存在,然后它就报错,对该表就不进行导入。
在后面加上
ignore=y
就可以了。
2
将d:\daochu.dmp中的表table1
导入
imp
system/manager@test
file=d:\daochu.dmp
tables=(table1)
基本上上面的导入导出够用了。

回答2:

你是要导出整个数据,还是导出某个用户数据,还是导出某个表?
1.导出整个数据库:
exp
userid=system/<你密码>
file=full.dmp
full=y
2.导用户数据:test/test
exp
userid=test/test
file=test.dmp
3.导出某个表:table1
exp
userid=test/test
tables=table1
file=table1.dmp