var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Need help with a simple DELETE
I have 2 tables:
<other fields ...>
I need to delete all records in tableB for which the value of
aFlag in tableA is 0.
They join on uniqueID.
Not all records in tableA have a related record in tableB.
Thanks in advance for any input,
delete from tableB where uniqueID IN (select * from tableA where aFlag = 0)
Thanks! You got me on the right track!
delete from tableB where uniqueID IN (select uniqueID from tableA where aFlag = 0)
Originally Posted by chassemerrill
sorry my bad...i meant that
You could probably improve the performance (if required) by using EXISTS rather than IN:
delete from tableB
from tableA ta
where ta.uniqueID = tableB.uniqueID
and ta.aFlag = 0 )