日期:2014-05-16  浏览次数:20665 次

数据库结构变化后 怎么把原来数据库的数据导入新的数据库里
现在的这个数据库表与表之间的结构有些问题,想要优化下,就是表的名称什么的不变,但是关联变化了。想问下,如果优化了之后,怎么样才能把现有数据库的数据导入新的里面,因为数据量很大,有几万。。。。急求

------解决方案--------------------
导成目标数据库得格式得文本文件
------解决方案--------------------
举个例子
old:test(a,b,c)
new:test_new(a,b,c,d,e)
export:insert into test_new(a,b,c,d,e) select a,b,c,1,1 from test;
After this operation completed,you need modify the value of d,e.Also you could set a defult value for the new column.