Inner join only return the values from columns which satisfy the Join Condition.
Syntax:
select columns_name from table1 fInner join/ join table2 On(expression) or Using(column_name) Where(expression) order by column name;
Example using On clause:
select emp_name, Dept_name from emp Inner join dept on(emp.emp_id = dept.emp_id);
Result:
Talha IT
Zubair Oracle
Salman Finance
Example With Using Clause:
select emp_name, Dept_name from emp Inner join dept using(emp_id);
Result:
Talha IT
Zubair Oracle
Salman Finance
No comments:
Post a Comment