【发布时间】:2020-04-24 14:14:24
【问题描述】:
select f1
from table1
where f1 in (select f1)
--running OK.
select f1
from table1
where f1 in (select f1 from tablex)
-- even the column f1 does not exist in tablex, running OK.
delete from table1
where f1 in (select f1 from tablex)
--If you do this, you may have an accident (delete all records from table1)
--even the column f1 does not exist in tablex.
以上 3 条 SQL 语句在 SQL Server 2008 - 2017 中都可以正常运行。
【问题讨论】:
标签: sql sql-server sql-server-2017