删除下面查询条件中查询到的内容,sql语句怎么写:
select  *from SurveyFeaturePoint_20136,SurveyFeature  
where SurveyFeaturePoint_20136.SurveyFeatureID = SurveyFeature.SurveyFeatureID and 
charindex('20',Longitude) > 0 or charindex('39',Latitude)> 0

解决方案 »

  1.   

    delete SurveyFeaturePoint_20136 
    from SurveyFeaturePoint_20136,SurveyFeature  
    where SurveyFeaturePoint_20136.SurveyFeatureID = SurveyFeature.SurveyFeatureID and 
    charindex('20',Longitude) > 0 or charindex('39',Latitude)> 0
      

  2.   

    delete from SurveyFeature  where SurveyFeatureID =(select SurveyFeatureID  from SurveyFeaturePoint_20136 where 
    charindex('105',Longitude) > 0 and charindex('35',Latitude)> 0 ) delete   from SurveyFeaturePoint_20136 where 
    charindex('105',Longitude) > 0 and charindex('35',Latitude)> 0