نشر بواسطة : Obay Salah , December 2, 2024

Oracle Equi join returns the matching column values of the associated tables. It uses a comparison operator in the WHERE clause to refer equality.

Syntax

SELECT column_list   
FROM table1, table2....  
WHERE table1.column_name =  
table2.column_name;  

Equijoin also can be performed by using JOIN keyword followed by ON keyword and then specifying names of the columns along with their associated tables to check equality.

Syntax

SELECT *  
FROM table1   
JOIN table2  
[ON (join_condition)]   


Oracle EQUI JOIN Example

Let' take two tables "agents" and "customer".

Agents table

Oracle Equi Join

Agent data

Oracle Equi Join 2

Customer table

Oracle Equi Join 3

Customer data

Oracle Equi Join 4

Execute this query

SELECT agents.agent_city,customer.last_name,    
customer.first_name   
FROM agents,customer    
WHERE agents.agent_id=customer.customer_id;    

Output

Oracle Equi Join 5



علامات : SQL

يمكن ان يعجبك ايضا


Comments

لايوجد تعليق حتى الان