SQL Left Join question

Database

SQL Left Join question

I was wondering if the following type of outer join works in Teradata.

select c.customer_id, order_dte
from customers c,
orders o
where c.customer_id = o.customer_id (+);

I'm aware that it will work in Oracle, was wondering if it also worked in Teradata.

Thanks,

4 REPLIES
Enthusiast

Re: SQL Left Join question

Hi,

The basic syntax for a two-table OUTER JOIN follows:
SELECT [.]
[…,.]
FROM [AS ]
{LEFT | RIGHT | FULL} [OUTER] JOIN
[AS ]
ON [.] = [.]
[ WHERE ] ;

No Join Operators: "(+)" or "*=" or "=*"

Cheers!
Enthusiast

Re: SQL Left Join question

Guess this could be viewed better -

The basic syntax for a two-table OUTER JOIN follows:

SELECT
[table-name.]column-name
[…,table-name2.]column-name
FROM table-name [AS alias-name]
{LEFT | RIGHT | FULL} [OUTER] JOIN
table-name2 [AS alias-name2]
ON [table-name.]column-name = [table-name2.]column-name
[ WHERE condition-test ] ;

Re: SQL Left Join question

select c.customer_id, o.order_dte

from customers c LEFT OUTER JOIN

orders o

where c.customer_id = o.customer_id;

sin
Fan

Re: SQL Left Join question

select c.customer_id, o.order_dte

from customers c LEFT OUTER JOIN

orders o

ON c.customer_id = o.customer_id;