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语句复制一条或多条记录
转载请保留出处和原文链接:https://www.cnhackhy.com/15447.htm