insert into 表2([user],[password],[email]) select [USER],[password],[email] from 表1
insert into 表2(user,password,email) select [USER],[password],[email] from 表1
insert into 表2(user,password,email) --你要插入表2的字段 select [USER],[password],[email] --选择插入的字段 from 表1 --如果你需要某些条件的字段插入+where条件 insert into 表2(user,password,email) --你要插入表2的字段 select [USER],[password],[email] --选择插入的字段 from 表1 where 你的条件
insert into gbk_chinese_ci select * from latin1_swedish_ci
insert into 表2(user,password,email) --你要插入表2的字段 select [USER],[password],[email] --选择插入的字段 from 表1 --如果你需要某些条件的字段插入+where条件 insert into 表2(user,password,email) --你要插入表2的字段 select [USER],[password],[email] --选择插入的字段 from 表1 where 你的条件
insert into 表2([user],[password],[email]) select [USER],[password],[email] from 表1
select [USER],[password],[email]
from 表1
select [USER],[password],[email] --选择插入的字段
from 表1
--如果你需要某些条件的字段插入+where条件
insert into 表2(user,password,email) --你要插入表2的字段
select [USER],[password],[email] --选择插入的字段
from 表1
where 你的条件
select [USER],[password],[email] --选择插入的字段
from 表1
--如果你需要某些条件的字段插入+where条件
insert into 表2(user,password,email) --你要插入表2的字段
select [USER],[password],[email] --选择插入的字段
from 表1
where 你的条件
然后运行
mysql -uroot -p --default-character-set=gbk -f 表2<c:test.sql
latin1_swedish_ci
select user,password,email,null,null from gbk_chinese_ci
default-character-set=utf8