试一下:
delete a
from db_b a,dba_b
where a.a_id=b.b_id and b.fld_c='x'
delete a
from db_b a,dba_b
where a.a_id=b.b_id and b.fld_c='x'
解决方案 »
- sql中的数据类型,如何选择
- 好久没写SQL了,求个语句,多谢
- sql server 2005 里 有没有诸如 select 第10 到 20 个记录 from 表名 这样的改进语句?假如符合条件的有100个记录的话。
- 200求1万条记录(不要错的太离谱就行),不管用什么办法,只要给这么一个表给我有就有200给你(UP有分)
- if条件中的update语句为什么不能被执行
- !!!sql2000备份文件恢复出错(I/O 38 到达文件结尾)
- 简单查询问题在线等,急
- 如何用sql语句将一字段设为null?
- 在SQL SERVER 2000 的企业管理器中如何设定表的页锁或行锁?
- 紧急求助!!!(ORACLE DEVELOPER2000)
- 关于SQL函数应用问题
- 有关查询的问题!!
from db_b a,dba_b b
where a.a_id=b.b_id and b.fld_c='x'
delete a from db_b a join(select a_id from db_a where fld_c='x') b on a.b_id=b.a_id
from db_b b
where exists(
select 1 from(select a_id from db_a where fld_c='x')a
where b.b_id=a.a_id)
from db_b b join db_a a join a.a_id=b.b_id
where a.fld_c='x'