Subject Re: Help with a DELETE command
Author robert_difalco
--- In firebird-support@yahoogroups.com, "Ann W. Harrison"
<aharrison@i...> wrote:
> That statement is not just illegal, it's ambiguous. Do you
> delete the qualifying rows from PARENT, CHILD or both? Under
> the rules of an inner join, CHILD join PARENT on <condition>
> is the same as PARENT join CHILD on <condition>.

Understood. FWIW, why is this:

rset = exec( "SELECT ChildID FROM Parent WHERE Foo = some_num" );
while ( rset.next() )
exec( "DELETE FROM Child WHERE Id = " + rset.getLong( 1 ) );

Orders of magnitutede faster than this:

DELETE FROM Child
WHERE Id IN( SELECT ChildID FROM Parent WHERE Foo = some_num );

???

TIA,

R.