脚本专栏 
首页 > 脚本专栏 > 浏览文章

利用sql语句复制一条或多条记录

(编辑:jimmy 日期: 2024/10/18 浏览:3 次 )
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为数字类型,则去掉单引号.
上一篇:让IIS建立的站点默认是.net 2.0的,而不是.net 1.1的代码
下一篇:vbs Windows系统改变或修改网卡的MAC地址的脚本与软件