delete from msgmessag where exists (select 1 from msgmessag where contentid='9') 在oracle中执行这条语句后的结果不是应该:将msgmessag中contentid='9'的记录删除掉么?怎么会把msgmessag 这个表中所有的记录都给删掉

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 06:24:57
delete from msgmessag where exists (select 1 from msgmessag where contentid='9') 在oracle中执行这条语句后的结果不是应该:将msgmessag中contentid='9'的记录删除掉么?怎么会把msgmessag 这个表中所有的记录都给删掉
xN@_evD2A Ăt^ S@"?-BLABh!*e'BoڃP_+s[`pN-׃!nĺ5Jsٗ޻G8} ,lUeAm5*BZ0Bes%=ZRhu#6KHO{Li M-'3xtو?J<!\S_ּGPQppˆǜO)aF2J|?P;ha=HGy

delete from msgmessag where exists (select 1 from msgmessag where contentid='9') 在oracle中执行这条语句后的结果不是应该:将msgmessag中contentid='9'的记录删除掉么?怎么会把msgmessag 这个表中所有的记录都给删掉
delete from msgmessag where exists (select 1 from msgmessag where contentid='9')
在oracle中执行这条语句后的结果不是应该:将msgmessag中contentid='9'的记录删除掉么?怎么会把msgmessag 这个表中所有的记录都给删掉呢?

delete from msgmessag where exists (select 1 from msgmessag where contentid='9') 在oracle中执行这条语句后的结果不是应该:将msgmessag中contentid='9'的记录删除掉么?怎么会把msgmessag 这个表中所有的记录都给删掉
是会删除所有记录的,因为子查询这条记录是存在的.
你的查询可解释为删除 如果子查询中(msgmessag表)存在等于9的记录,就删除主表msgmessag.
应该与删除表建立关联:
delete from msgmessag where exists (select 1 from msgmessag A where contentid='9' AND A.CONTENTID=MSGMESSAG.CONTENTID)
该查询可解释为:删除 如果msgmessag(主查询)CONTENTID字段与子查询相同就删除该记录.(子查询中的CONTENTID字段等于9并且与主查询相同).
效果等同于delete from msgmessag where contentid='9

I have delete you from my just delete me from your buddy list you can delete me from your list 是什么意思 delete from tablea & truncate table tablea 的区别? 英语翻译文件名是UserConfig.sql内容是:GO--delete old recorddelete from sysparam where p_name = 'Authercase' delete from sysparam where p_name = 'UserCFG_CRCCode' delete from sysparam where p_name = 'UserCFG_ICCard_Pwd' GO---- From Date:2007 delete table from table where …… 我常见的都是 delete from table[A] where …………是 delete table[A] from table[B] where ………… i delete you from my list stop to talk to me we must keep away from some bad information or delete it有错吗 VFP里的%是什么意思例:delete from 图书 where 书名=”A% 为什么不用“A* delete from 表名 where status=1什么意思请问status=1代表什么? Do you really want to delete yi8fang from your block list? delete意思 urgent delete, delete是什么意思? SQL简单语句 DELETE FROM table如何实现:删除Id从4到最后一条记录的SQL语句DELETE FROM table WHERE Id BETWEEN 4 AND ...我本来想:DELETE FROM table WHERE Id BETWEEN 4 AND (SELECT COUNT(Id) FROM table)但是不对啊. delete title from film where year>1970;这句哪里错了?删除资料:就会删除所有年代早于1970年(不含)的电影了.delete title from film where year i want to delete you from my life这句话是什么意思,请大家帮我翻译下! DELETE FROM L_DanWei WHERE dw_id = @dw_id这几句话啥意思 特别是后面的dw_id 和 @dw_id啥意思