user3728327
user3728327

Reputation: 25

Select FROM syntax multiple tables Oracle 11G

Hi there I have multiple tables which I extract data. I have a question regarding the syntax for ORACLE 11 g I have used SQL server before .

My Query looks like this

FROM 
dw_bi.dw_detalle_altas
let join dw_bi.dm_producto_claro

is the first part before the period dw_bi the schema ? object? and the second part dw_detalle_altas and dm_producto_claro the table?

Upvotes: 0

Views: 231

Answers (2)

Narayan Yerrabachu
Narayan Yerrabachu

Reputation: 1823

You can use Left outer join or inner join to fetch data from multiple tables.

Left Outer join:

SELECT *
FROM table1 AS T1
LEFT OUTER JOIN table2 AS T2
ON T1.column_name = T2.column_name;

Inner Join:

SELECT *
FROM table1 AS T1
INNER JOIN table2 AS T2
ON T1.column_name = T2.column_name;

Upvotes: 1

Tim Biegeleisen
Tim Biegeleisen

Reputation: 520908

According to the Oracle docs, the term before the dot is the schema, and the term after the dot is the table. So, in general, your query would look like:

SELECT *
FROM yourSchema.table1 t2
LEFT JOIN yourSchema.table2 t2
    ON -- some conditions

Upvotes: 3

Related Questions