Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> SQL DELETE Question

SQL DELETE Question

From: <k_chui_at_my-dejanews.com>
Date: Thu, 11 Jun 1998 19:20:31 GMT
Message-ID: <6lpalv$8ts$1@nnrp1.dejanews.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US