Oracle样式加入SQL Server [英] Oracle Style Joins in SQL Server

查看:76
本文介绍了Oracle样式加入SQL Server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在SQL Server中进行oracle风格的连接?

Is there a way to do oracle style joins in SQL Server?

select * 
from t1, t2
where t1.id = t2.id (+)


编辑

为什么最好改为使用左外部联接"和内部联接"类型?我发现阅读旧表格更容易,尤其是在涉及复杂的表联接的情况下.


EDIT

Why is it preferable to use the "left outer join" and "inner join" types instead? I find it easier to read the older form, especially if there are complex table joins involved.

推荐答案

Microsoft使用的是ANSI ISO SQL标准.马克·里特曼(Mark Rittman)对 ANSI联接以及为什么要使用它们有很好的解释.但是,SQL Server不支持该文章和ANSI标准中列出的NATURAL JOIN语法.您可能对旧的Oracle语法更加熟悉,但这是标准的语法,在其他数据库产品中也可以找到.

Microsoft is using the ANSI ISO SQL Standard. Mark Rittman has a good explanation of ANSI joins and why you should use them. SQL Server, however, doesn't support the NATURAL JOIN syntax that's listed in that article and the ANSI standard. You may be more familiar with the old Oracle syntax, but it is the standard and something that you'll find on other database products.

要回答您的问题-无法在SQL Server上执行Oracle样式联接.甚至*==*样式的连接都已被弃用,并将在该产品的下一版本中完全删除.

To answer your question - there is no way to perform Oracle style joins on SQL Server. Even the *= and =* style joins have been deprecated and are being removed completely in the next version of the product.

这篇关于Oracle样式加入SQL Server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆