当前位置: 代码迷 >> Sql Server >> 剔除 跨表
  详细解决方案

剔除 跨表

热度:512   发布时间:2016-04-24 20:04:48.0
删除 跨表
删除下面查询条件中查询到的内容,sql语句怎么写:
select  *from SurveyFeaturePoint_20136,SurveyFeature  
where SurveyFeaturePoint_20136.SurveyFeatureID = SurveyFeature.SurveyFeatureID and 
charindex('20',Longitude) > 0 or charindex('39',Latitude)> 0

------解决方案--------------------
delete SurveyFeaturePoint_20136 
from SurveyFeaturePoint_20136,SurveyFeature  
where SurveyFeaturePoint_20136.SurveyFeatureID = SurveyFeature.SurveyFeatureID and 
charindex('20',Longitude) > 0 or charindex('39',Latitude)> 0
------解决方案--------------------
每次DELETE只能删除一个表
  相关解决方案