Quote:
Originally posted by ARWinner
No you cannot do that.
Andy
|
From what I remember, DELETE can be used together with a JOIN.
For example, let us say one wants to DELETE all employees from
table: PROD.EMPLOYEE whose job-description is associated with an
'Computer Progammer' job description. (realistic situation ???).
Now assuming that job-descriptions are stored in the
PROD.JOB table, then I believe this DELETE statement would accomplish this:
DELETE FROM PROD.EMPLOYEE A,
PROD.JOB B
WHERE A.JOB_NUMBER = B.JOB_NUMBER
AND B.JOB_DESC = 'COMPUTER PROGRAMMER'
I believe the above DELETE statement will only affect rows on the
PROD.EMPLOYEE table without affecting the rows on the PROD.JOB
table. I would suggest running a test of the above SQL in some interactive testing environment (QMF, or whatever) to test it beforehand.
The above uses a traditional (inner) join as the example. I have never tried it with a LEFT or RIGHT outer join.
regards
dcshnier