急急急!!SQL问题,我要将从table1差出的数据放到table2,同时删除table1里面查出的数据,该怎么写?

[复制链接]
查看11 | 回复5 | 2011-9-8 10:07:34 | 显示全部楼层 |阅读模式
大优 09:48:01查询数据的语句写出来了吧?a385406625 09:50:03我要将从shoplist查出的数据放到test里面,同时删除shoplist里面查出的数据,该怎么写?要是同时发生的大优 09:50:30两条语句可以不a385406625 09:50:44 您先写给我看看吧大优 09:51:35Insert into test(字段名称)select 字段名称 from shoplist where 条件godelete from shoplist where 条件 goa385406625 09:52:15这样不行...
回复

使用道具 举报

千问 | 2011-9-8 10:07:34 | 显示全部楼层
update table1 set status='1' where ...insert into table2 select * from table1 where status='1'delete from table1 where status='1'...
回复

使用道具 举报

千问 | 2011-9-8 10:07:34 | 显示全部楼层
我用ASP+ACCESS解答<%'从表1中读取符合条件的记录(数据)set rs_1=Server.Cr...
回复

使用道具 举报

千问 | 2011-9-8 10:07:34 | 显示全部楼层
insert into table2 select * from table1delete from table1...
回复

使用道具 举报

千问 | 2011-9-8 10:07:34 | 显示全部楼层
Insert into table2(字段名称) select 字段名称 from table1 where 条件;如果插入成功delete from table1 where 条件...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行