Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Deleting records where they are in another table
Hi - I am new to Oracle SQL and have the following question.
I have a table with records which have unique id's and dates in (uid may have a number of records) but the recs are uniq on uid+date.
Another table has the uid + max(date) record from the 1st table.
I want to delete the records in the 1st table that are from the 2nd table with the criterion being uid+date.
I have tried code like:
delete from table_A
where (select from table_A A, table_B where B where a.uid=b.uid and
a.date=b.date)
Which ever way I try I get some sort of error.
What I am after is the proper syntax structure to do the job.
Can anyone help?
Many thanks
Andrew Received on Tue May 30 2006 - 08:52:33 CDT