求一删除语句

广州人 2009-10-30 02:05:56
我现在又一个临时表#temp,字段跟employee表一样,

临时表中的数据量比employee表中的数据量要少。

现在想在employee表中删除#temp中的数据,怎么写语句?

谢谢各位
...全文
42 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
apple130 2009-10-30
  • 打赏
  • 举报
回复

来学习
--小F-- 2009-10-30
  • 打赏
  • 举报
回复
delete  from employee where id  in(select id from #temp)
--小F-- 2009-10-30
  • 打赏
  • 举报
回复
delete  from employee where id  in(select id from #temp0
liangCK 2009-10-30
  • 打赏
  • 举报
回复
delete e
from employee as e
where exists(select * from #temp where e.empid=empid)

34,591

社区成员

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

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