--- Peter Hyde <[EMAIL PROTECTED]> wrote:
> I want to delete from "A" all items which are not currently
> represented in B. I could use this SQL I think, but I'm conscious
> of how SLOOOOOOW it would be, because the second query is
> going to be run for EVERY row in A.
I don't understand why the sub-query would need to be executed once for
every row in 'A'.
Surely a half-decent optimizer should cope with that statement
sensibly?
Martin's comments high-light some problems too, he says
> BUT: Your db may not allow deleting from a table referenced in a
> subquery.
Like Informix :-)
Informix lets you use temporary tables instead, but Interbase doesn't
*have* temporary tables.
Isn't the SQL "standard" just a delight?
Cheers,
Kerry "I know I didn't actually help" S
===
-- Systems Engineer, Inprise NZ. [EMAIL PROTECTED]
_______________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com.au address at http://mail.yahoo.com.au
---------------------------------------------------------------------------
New Zealand Delphi Users group - Database List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz