gpt4 book ai didi

sql-server - Oracle 和 SQL Server select (+) 等效

转载 作者:行者123 更新时间:2023-12-02 10:41:44 26 4
gpt4 key购买 nike

在 Oracle 中我有:

SELECT t2.Regkood, t2.naitatel, t2.naitafaks, t3.lahtiolekuaeg, t1.*
FROM table1 t1, table2 t2, table3 t3
WHERE t1.client = t2.client AND t1.client = t3.client(+) AND t1.client = 414246

如何在 SQL Server 中获得相同的结果?

谢谢

最佳答案

SELECT t2.Regkood, 
t2.naitatel,
t2.naitafaks,
t3.lahtiolekuaeg,
t1.*
FROM table1 t1
INNER JOIN table2 t2
ON t1.client = t2.client
LEFT JOIN table3 t3
ON t1.client = t3.client
WHERE t1.client = 414246

一些了解连接的示例:

ORACLE 中的左外连接

SELECT *
FROM A, B
WHERE A.column = B.column(+)

ORACLE 中的右外连接

SELECT *
FROM A, B
WHERE A.column(+)=B.column

关于sql-server - Oracle 和 SQL Server select (+) 等效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10994381/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com