0
点赞
收藏
分享

微信扫一扫

将一个表的数据插入到另一个表中

扒皮狼 2022-08-04 阅读 189


--b表存在(两表结构一样) insert into b select * from a


若两表只是有部分(字段)相同,则


insert into b(col1,col2,col3,col4,...) select col1,col2,col3,col4,... from a where...


把表a插入到表b中去。


--b表不存在 select * into b from a


//


select (字段1,字段2,...) into b from a

举报

相关推荐

0 条评论