删除语句

delphiprogramer 2003-09-15 03:50:28
要实现以下的删除功能
delete spcselecttemp from spcselecttemp a,spccharact b where a.fid=b.charactid
不能用in 和exists,怎么实现?急
...全文
30 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
Drate 2003-09-15
  • 打赏
  • 举报
回复
什么不能用IN和?EXISTS?
你是说在DELETE语句中不能用这两个关键字吗?
呵呵,如果按你上面的语法写的话,删除的可是两个表的内容呀
delete spcselecttemp from spcselecttemp a,spccharact b where a.fid=b.charactid

-==>>
delete spcselecttemp from spcselecttemp where fid in (select charactid from spccharact);
or:
delete spcselecttemp from spcselecttemp where fid = (select charactid from spccharact);

17,382

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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