首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

容易SQL,帮忙看看!马上结帐

2011-12-20 
简单SQL,帮忙看看!马上结帐DELETEFROMT_SchAWHERE(A.ex_fg999)AND(A.door_noIN(SELECTB.door_noFROMT_Doo

简单SQL,帮忙看看!马上结帐
DELETE   FROM   T_Sch   A   WHERE   (A.ex_fg   =   999)
  AND   (A.door_no   IN   (SELECT   B.door_no   FROM     T_Door   B
  WHERE   (B.door_key   =   1)))
现在想要加删除一个条件:(A.bc_no   IN   (SELECT   B.bc_no   FROM     T_Door   B
  WHERE   (B.door_key   =   1)))
该怎么加?

[解决办法]
DELETE FROM T_Sch A WHERE (A.ex_fg = 999)
AND (A.door_no IN (SELECT B.door_no FROM T_Door B
WHERE (B.door_key = 1)))
AND A.bc_no IN (SELECT B.bc_no FROM T_Door B
WHERE (B.door_key = 1))
[解决办法]
同意楼上的

热点排行