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

Home -> Community -> Usenet -> c.d.o.server -> SQL Delete question

SQL Delete question

From: Bill Mann <bill.mann_at_worldtalk.com>
Date: Mon, 14 Jun 1999 17:53:01 -0700
Message-ID: <3765A3ED.24321579@worldtalk.com>


I'm trying to write a DELETE SQL statement that will delete all the records returned from a select command. I have tested the select command and it works, but I get compilation errors when I combine with Delete. Is there a better way to delete a number of records. I know I could use the WHERE clause in the DELETE, but I need to use START WITH and CONNECT, these are only available in the SELECT statement.

DELETE FROM (SELECT name FROM table
  START WITH
   manager = (select manager from table where grade = 3)   CONNECT BY
   PRIOR manager = level)

Thanks again.
Bill. Received on Mon Jun 14 1999 - 19:53:01 CDT

Original text of this message

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