日期:2014-05-17  浏览次数:20468 次

删除 跨表
删除下面查询条件中查询到的内容,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只能删除一个表