What is an Equi Join in Oracle SQL? PLSQL INTERVIEW QUESTION AND ANSWER FOR FRESHER, INTERMEDIATE AND EXPERIENCED CANDIDATE.
What is an Equi Join in Oracle SQL?
It is the kind of join operation in SQL which is used to combine the two tables on the basis of matching column between them. It will return all the rows from both tables and the value of the specified column should be equal. It is called as the type of inner join. It compares each column value of the source table with each value in the corresponding target table. It will not display null or unmatchable data. It is important for the data integrity, query performance and data normalization.
Syntax:
select * from table1 join table2 ON table1.column_name=table2.column_name;
OR
select column_name(s) from table1,table2 where table1.column_name=table2.column_name;
In the above syntax, table1 and table2 are the two different tables which are being joined by using the common column name column_name in both tables i.e table1 and table2.Here, ON is the keyword which specifies the condition for combining the tables. Equality between the columns in the given column. We match the deptid in the employee table with the deptid in the department table. It is used to analyze the merged data.
select * from emp,dept where emp.deptno=dept.deptno
order by emp.deptno;
Comments
Post a Comment