GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Mainframe  >  DB2
Go To First  |  Previous Question  |  Next Question 
 DB2  |  Question 8 of 196    Print  
What techniques are used to retrieve data from more than one table in a single SQL statement?
Joins, unions and nested selects are used to retrieve data.


  
Total Answers and Comments: 3 Last Update: March 16, 2007   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
May 04, 2005 00:24:32   #1  
suman        

RE: What techniques are used to retrieve data from more than one table in a single SQL statement?
Join Techniques are used to retrieve data from more than one table in a single SQL statement.
 
Is this answer useful? Yes | No
December 15, 2005 09:20:50   #2  
Azahar        

RE: What techniques are used to retrieve data from mor...

EXEC SQL                                            
 
   SELECT                                         
      A.EMP_ID 

      ,B.WAGE                                     
    FROM                                            
      Table1 A,                                    
      Table2 B                                 
    WHERE                                           
      A.EMP_ID     = 100001                  
    
END-EXEC.    

This is an example of a simple join query

                                      


 
Is this answer useful? Yes | No
March 16, 2007 05:17:30   #3  
AR        

RE: What techniques are used to retrieve data from mor...
The two tables has to be linked.

EXEC SQL

SELECT A.EMP_ID, B.WAGE
FROM Table1 A,  Table2 B
WHERE A.EMP_ID = B.EMP_ID


AND
A.EMP_ID = 100001
END-EXEC.
 

Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape