Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> SQL Delete question
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
![]() |
![]() |