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.

Showing Answers 1 - 4 of 4 Answers

suman

  • May 4th, 2005
 

Join Techniques are used to retrieve data from more than one table in a single SQL statement.

Azahar

  • Dec 15th, 2005
 

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

                                      

  Was this answer useful?  Yes

AR

  • Mar 16th, 2007
 

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.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions