dcsimg
Results 1 to 5 of 5

Thread: Deleting rows from one table where foriegn key doesn't exist in another.

  1. #1
    Join Date
    Oct 2006
    Posts
    5

    Deleting rows from one table where foriegn key doesn't exist in another.

    Hi,

    I would like to know how to delete rows from one table that are not associated with any rows in another table. Please help me with this. Thanks.

    ~Lavender

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    Do you need to check other tables? If no, just delete it.

  3. #3
    Join Date
    Oct 2006
    Posts
    5

    deleting table

    Yes, I have to check for atleast one more table.

  4. #4
    Join Date
    Sep 2002
    Posts
    5,938
    Which rdbms do you use? In MS sql, you can use exists to test for the existence of rows.

  5. #5
    Join Date
    Oct 2006
    Posts
    5
    I use 10g. I was able to delete the rows.

    thanks.

Posting Permissions

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