where we have to use ON clause and where we have to use USING
clause in JOINS
Answers were Sorted based on User's Feedback
Answer / saiprasanna
in ansi style the join condn can be given bu using "ON-clause"
or by using "USING-clause".
"USING" clause can be used if common column name is same other
wise "ON" clause is used.
ex:-select e.ename,d.dname from emp e join dept d on e.deptno
=d.deptno;
select e.ename,d.dname from emp e join dept d using(deptno);
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / vipul.solanki
It gives same result.when colum name is same then we can use
Using clause
with use USING :
SELECT * FROM MENU_MASTER MM JOIN MENU_ROLE_METRIX MRM
USING(NMENUNO);
with use ON :
SELECT * FROM MENU_MASTER MM JOIN MENU_ROLE_METRIX MRM ON
MM.NMENUNO = MRM.NMENUNO;
| Is This Answer Correct ? | 0 Yes | 0 No |
Is there an oracle sql query that aggregates multiple rows into one row?
What is RULE-based approach to optimization ?
How to store only time; not date and time?
What is an Index ?
How to export your connection information to a file?
Calculate difference between 2 date / times in oracle sql?
How to retrieve data from an explicit cursor?
What are the differences between lov and list item?
What are the uses of linked server and explain it in detail?
How to empty your oracle recycle bin?
What are the different types of database objects?
Explain how you would restore a database using RMAN to Point in Time?