sql server 2008 management studio not checking the syntax of my query

后端 未结 2 1776
别跟我提以往
别跟我提以往 2020-11-22 08:23

As always, there will be a reasonable explanation for my surprise, but till then....

I have this query

delete from Photo  where hs_id  in (select hs_         


        
2条回答
  •  粉色の甜心
    2020-11-22 08:46

    It's a strong argument for keeping column names consistent between tables. As @Martin says, the SQL syntax allows column names to be resolved from the outer query, when there's no match in the inner query. This is a boon when writing correlated subqueries, but can trip you up sometimes (as here)

提交回复
热议问题