如题,sql server 2000delete from #ta where exists (select 1 from #tb b where #ta.id=b.id) 上面是可以的,但是如果用了#ta的别名,就不行了,提示 : 'a'附近有语法错误 delete from #ta a where exists (select 1 from #tb b where a.id=b.id)
解决方案 »
- 求解一段插入数句的语句
- 请教一条查询语句(急)
- update tempcode set tempcode.ccode=km.ccode from tempcode,km where tempcode.iid=km.ccode
- 请教一条Select语句
- 给一个解决方法,关于大数据量order by的办法
- 如何将记录转为字段名??
- sql2000企业管理器打开后,很快就自动关闭
- 一个有关文本相加的问题
- 请问在设计字符类型的表字段时用varchar()类型好还是用char()类型好?
- 合并字段数据的sql怎么写?
- 常用(经典)SQL语句汇总贴
- 在sql2000中,row_number函数不支持??怎么办
from #ta a
where exists (select 1 from #tb b where a.id=b.id)
delete #ta --用别名 from #ta a where exists (select 1 from #tb b where a.id=b.id) -------以上两种都可以
delete from #ta a--有别名时,等同于两个表.要指定一个表名
from #ta a
where exists (select 1 from #tb b where a.id=b.id)