1.本地数据库新建一个用户test,并授予以下基本权限(尽量不要多授权,如本地权限大于远程,会导致导出失败,郁闷!): grant connect to test;grant resource to test;grant create table, create database link to test;grant create session to test; 2.创建远程dblink create public database link linkname_xxx connect to u
导出TXT关键类: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data; using System.IO; using System.Globalization; using System.Windows.Forms; namespace Demo { /// <summary> /// 导出TXT /// 罗旭成 /// 2014-4-1
select id,name, concat('tel:',phone) from user order by time INTO outfile 'user.txt' FIELDS terminated by '\,';字段以逗号分隔,导出的user.txt文件在数据库目录下 导出结果到sqlselect * from user into outfile '/home/db.sql'; 字段之间的分隔字符,转义字符,包括字符,及记录行分隔字符.列在下面: FIELDS TERMINATED B