16.移动数据
oracle:
外部表,sqlloader,expdp\exp /impdp/imp
mysql:
select into outfile / load data [local] infile 对应 sqlloader
下面是例子:
select * into outfile '/u01/test/emp2.sql' fields terminated by ',' from emp;
[root@sztech1 test]# more emp2.sql 100,smitty,5000,2015-04-05 200,\N,\N,\N 300,\N,\N,\N
mysql> desc emp_bak -> ; +-----------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------+-------------+------+-----+---------+-------+ | empid | int(11) | YES | | NULL | | | last_name | varchar(20) | YES | | NULL | | | salary | double | YES | | NULL | | | hire_date | date | YES | | NULL | | +-----------+-------------+------+-----+---------+-------+ 4 rows in set (0.01 sec)
load data infile '/u01/test/emp2.sql' into table emp_bak fields terminated by ',' ;
外部表好像没有看到
mysqldump 对应 oracle的 exp/imp
[此贴子已经被作者于2015-04-22 22:54:13编辑过] |