What techniques are used to retrieve data from more than one table in a single SQL statement?
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
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.