Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> SQL DELETE Question
I'm doing joins and adding WHERE clauses to my DELETE statement (example
below)
DELETE from TABLENAME
WHERE OPERATOR_ID =
(SELECT A.OPERATOR_ID
from TABLENAME A, TABLENAME B,
WHERE........)
AND DEPT_ID =
(SELECT A.DEPT_ID
from TABLENAME A, TABLENAME B,
WHERE........)
AND....
Right now I'm writing a subquery for each field, but I want to minimize the
amount of typing and cut/paste for the DELETE because it might run 2+ pages.
I need to know if I can do something similar to an INSERT-type statement
below, but with the DELETE command instead:
INSERT into TABLENAME
(FieldA,
FieldB,
FieldC)
SELECT
Field A,
FieldB,
FieldC
FROM......
Thanks.
KC
kchui_at_smtpgw.arms.ohio-state.edu
-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Thu Jun 11 1998 - 14:20:31 CDT
![]() |
![]() |