DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: delete from multiple tables

  1. #1
    Join Date
    Jun 2002
    Posts
    2

    Question

    I am writing a program that needs to delete data across multiple tables.

    is there a way with a SQL command to delete records from more than one table.

    this is what i am trying to do:

    DELETE FROM REQUESTS, REQUEST_ITEMS WHERE REQUESTS.REQID = 1 and REQUEST_ITEMS.REQID = 1;

    but I keep getting errors. I am using Oracle 9i.

    Thanks,

    I can't change the way the database works, so please only answers that wuld have a solution with SQL.

    -Mike

  2. #2
    Join Date
    May 2002
    Posts
    2,645
    You should be getting errors. You can only delete from one table at a time. That is how Oracle works.

    Why does the delete have to be in or on one line?

  3. #3
    Join Date
    Jun 2002
    Posts
    2
    I guess I don't really need the delete in a single statement.

    Thanks for the quick reply.

    -Mike

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width