导出mysql数据库表中的部分字段
【思路】先把要导出的字段建立一张新表,然后将就表中要到处的字段数据复制到新表中,最后将新表中的字段全量导出即可。
1、将要导出的字段建立一个新表e_inv_investment_new ,如要导出字段 eid、inv_eid、inv、subconam
建表:

2、利用sql将旧表 e_inv_investment 中的字段数据插入到新表 e_inv_investment_new
使用insert into new-table (a,b,c) select a,b,c from old-table;
对应sql:insert into e_inv_investment_new (eid,inv_eid,inv,subconam) select eid,inv_eid,inv,subconam from e_inv_investment;
检验是否导出成功

3、全量导出新表中的数

点击下一步,按步骤操作,即可导出文件。

浙公网安备 33010602011771号