GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Tech FAQs  >  PL/SQL
Go To First  |  Previous Question  |  Next Question 
 PL/SQL  |  Question 28 of 166    Print  
when we need to use USING clause in the sql?For example in this below:
SELECT emp_name, department_name, city FROM employees e JOIN departments d USING (department_id) JOIN locations l USING (location_id) WHERE salary > 10000;

Can anyone explain what is mean of USING in this sql statement? or USING concept in brief?

Thank you.

  
Total Answers and Comments: 5 Last Update: November 18, 2009     Asked by: michelle 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
March 23, 2006 00:47:06   #1  
kishore        

RE: when we need to use USING clause in the sql?For ex...

HI

Using clause is some thing like that we dont need to mention the join condition when we r retreiveing data from the multiple tables.when we use using clause that particular column name shud present in both the tables and the select query will automatically join those tables using the given column name in USING clause.


 
Is this answer useful? Yes | No
March 27, 2006 02:19:54   #2  
Guna Sagar Challa        

RE: when we need to use USING clause in the sql?For ex...

Hi

The using clause in Oracle is to support ANSI standard SQL for writing joins.

The same query can be written in the form of

SELECT emp_name department_name city
FROM employees e departments d locations l
WHERE d.department_id e.department_id
AND d.location_id l.location_id
AND salary > 10000

Guna Sagar Challa


 
Is this answer useful? Yes | No
January 22, 2007 05:48:21   #3  
Rohan Deshpande        

RE: when we need to use USING clause in the sql?For ex...

for e.g. if there are two common column names in the table then Mention the desire common column name in the USING clause....


 
Is this answer useful? Yes | No
March 09, 2007 04:07:14   #4  
ravikumarzee@gmail.com Member Since: February 2006   Contribution: 16    

RE: when we need to use USING clause in the sql?For ex...
USING is also used while executing Dynamic SQL.

e.g.

EXECUTE IMMEDIATE 'DELETE FROM dept WHERE deptno :num'
USING dept_id;

 
Is this answer useful? Yes | No
November 17, 2009 06:41:30   #5  
hmounir Member Since: November 2009   Contribution: 1    

RE: when we need to use USING clause in the sql?For example in this below:SELECT emp_name, department_name, city FROM employees e JOIN departments d USING (department_id) JOIN locations l USING (location_id) WHERE salary > 10000; Can anyone explain what i
In natural joins USING clause can be used to specify only those culomns that should be used for an equijion
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape