在甲骨文我有:
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, 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