Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2010

    Unanswered: Delete with Joins???

    I have to delete rows from a table based on a successful join to a 2nd table.

    There is no single column join -- the join is based on six fields matching.

    In Sybase this would be easy, but I can't figure out how to do it in Oracle (11g).

    Any suggestions?

    delete TABLE1
    from TABLE1 a,
    TABLE2 b
    where a.Type = b.Type
    and a.ID = b.ID
    and a.Date = b.Date
    and a.Time = b.Time
    and a.Title = b.Title;

  2. #2
    Join Date
    Aug 2003
    Where the Surf Meets the Turf @Del Mar, CA
    Provided Answers: 1
    delete from TABLE1 a where (a.Type, a.ID, ,a.Date , a.Time , a.Title ) in (SELECT b.Type, b.ID, b.Date, b.Time, b.Title FROM TABLE2 b);
    Last edited by anacedent; 02-03-10 at 00:17.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Feb 2010


    Thanks so much! That worked perfectly!

Posting Permissions

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