1、導出txt
select * into
outfile "d:/dataout.txt"
fields terminated by "|"
lines terminated by "\n"
from export_test
2、導入txt
load data
infile "d:/dataout.txt"
into import_test
fields terminated by "|"
lines terminated by "\n"
3、替換特定字符
select *,replace(adstract,char(10)," ") into
outfile "d:/dataout.txt"
fields terminated by "|"
lines terminated by "\n"
from export_test
1、從將234的表複製到 本機
copy from hps/hps@suda234 to scott/guojianbing@ORCL replace CHINA_PATENT using select * from USR_DATA_INP.CHINA_PATENT;
2、將本機的表複製到71
copy from scott/guojianbing@ORCL to hps/hps@suda71 replace CHINA_PATENTusing select * from CHINA_PATENT
set long 150;
set copycommit 1
set arraysize 150
1、創建DBLINK
create public database link link234tome connect to hps identified by hps using 'suda234';
2、導入一般表
copy from hps/hps@suda234 to scott/guojianbing@ORCL replace TB_MOBIL_TEXT using select * from TB_MOBIL_TEXT;
3、導入clob表(不能運行成功,不能通過DBLINK執行ddl語句,可以手動建一個空表 執行如下insert語句)
create table TB_MOBIL_TEXT as select * from TB_MOBIL_TEXT@LINK234TOME;
4、
insert into TB_MOBIL_TEXT@link71 select * from TB_MOBIL_TEXT
5、查看已經創建的DBLINK
select * from dba_objects where object_type='DATABASE LINK'
6、刪除一個dblink
DROP PUBLIC DATABASE LINK dblinkname