View previous topic :: View next topic |
Author |
Message |
Veera333 Beginner
Joined: 16 Jul 2010 Posts: 7 Topics: 5
|
Posted: Wed Aug 11, 2010 1:53 am Post subject: Help on Discard |
|
|
Hi,
Can i use joins in DISCARD statement.
For example DISCARD FROM TABLE A
WHEN (SELECT 1 FROM TABLE B
WHERE A.COLUMN1 = B.COLUMN1)
Thanks in advance.
Thanks,
Veera |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Wed Aug 11, 2010 9:29 am Post subject: |
|
|
Veera333,
If your intention is to delete the matching rows from table A then use the following sql (untested)
Code: |
DELETE
FROM TABLEA X
WHERE COLUMN1 IN (SELECT COLUMN1
FROM TABLEB Y
WHERE X.COLUMN1 = Y.COLUMN1)
;
|
Kolusu |
|
Back to top |
|
|
|
|