SQL Server - 缺少 NATURAL JOIN/x JOIN y USING(field) [英] SQL Server - lack of NATURAL JOIN / x JOIN y USING(field)
问题描述
我刚刚阅读了 NATURAL JOIN/USING - SQL92 特性,这些特性(遗憾的是?)在 SQL Server 的当前曲目中缺失.
I've just been reading up on NATURAL JOIN / USING - SQL92 features which are (sadly?) missing from SQL Server's current repertoire.
有没有人从支持这些的 DBMS 到 SQL Server(或其他不支持的 DBMS) - 它们是像听起来一样有用,还是一堆蠕虫(听起来也有可能!)?
Has anyone come from a DBMS that supported these to SQL Server (or another non-supporting DBMS) - were they as useful as they sound, or a can of worms (which also sounds possible!)?
推荐答案
我从不使用 NATURAL JOIN
因为我不喜欢 join 可能会做一些我不打算做的事情,只是因为两个表中都存在某些列名.
I never use NATURAL JOIN
because I don't like the possibility that the join could do something I don't intend just because some column name exists in both tables.
我偶尔会使用 USING
连接语法,但结果证明我需要一个比 USING
支持的更复杂的连接条件,所以我转换了它毕竟是等效的 ON
语法.
I do use the USING
join syntax occasionally, but just as often it turns out that I need a more complex join condition than USING
can support, so I convert it to the equivalent ON
syntax after all.
这篇关于SQL Server - 缺少 NATURAL JOIN/x JOIN y USING(field)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!