两个表中记录的移动

linzhengqun 2006-02-16 11:46:20
有表A和B,
A和B都有字段A1(主键),A2;
现想将表B的一条记录移到表A,然后表B删除该记录。
怎么做
...全文
91 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
QQMagicer 2006-02-16
  • 打赏
  • 举报
回复
select A1,A2 into A from B where B.A1 = 条件

delete from B where A1= 条件
-狙击手- 2006-02-16
  • 打赏
  • 举报
回复
select A1,A2 into B from A where ....
delete from B where .....
lovcal 2006-02-16
  • 打赏
  • 举报
回复
select A1,A2 into B from A
delete from B where A1=你的记录PK

34,594

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧