Subject Re: [firebird-support] for select c from t where :p = initial-value-of-p into p .... weird behavior
Author Anderson Farias
Hi,

> SQL1: for select c, c from t where :p = 1234 into p, r do suspend;
> SQL2: for select c from t where c in (1, 2, :p) into r do


IMHO, the difference seems clear. On the first SELECT is the *param* that is evaluated so for each row in the table the engine cheks it again, while on the 2nd select is the table *field* that is evalueted so it seems logical (not to mention performance reasons) that all rows are selected at once based on the [field] criteria.

These are 2 different cases, than with diferent behaviors.


Regards,
Anderson Farias


[Non-text portions of this message have been removed]