1.語法
insert into 新建表名 (新建表的字段)
select 字段1,字段2,字段3 ······
2.例子
insert into newtb (district,districtid,town,townid,village,villageid) select infotb.district,infotb.districtid,infotb.town,infotb.townid,infotb.village,dictionary.villageid from infotb,dictionary where infotb.village like dictionary.village and infotb.town like dictionary.town and infotb.districtid like dictionary.districtid;
3.select的特殊用法
select 1 from 表名
查詢結果為表內數據個1
select 后邊還可以直接跟字符串或數字,查詢結果的的對應字段處都是該數字或者字符串。