我是靠谱客的博主 明亮棒球,这篇文章主要介绍利用sql语句复制一条或多条记录,现在分享给大家,希望可以做个参考。

insert into article (id,class,title,content) select id,'2',title,content from article where class='1' 

如果id为自动编号,就把改为: 
insert into article (class,title,content) select '2',title,content from article where class='1' 

如果class为数字类型,则去掉单引号.

最后

以上就是明亮棒球最近收集整理的关于利用sql语句复制一条或多条记录的全部内容,更多相关利用sql语句复制一条或多条记录内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(132)

评论列表共有 0 条评论

立即
投稿
返回
顶部