Topic: IF and FOR SELECT on a deleted field
execute block as declare vN VARCHAR (250); begin IF (EXISTS (SELECT 1 FROM RDB$RELATION_FIELDS WHERE RDB$RELATION_NAME = ' T1 ' AND RDB$FIELD_NAME = ' TXT ')) THEN BEGIN for select TXT from T1 into:vN do ---- EXECUTE STATEMENT ' ALTER TABLE T1 DROP TXT '; end end
Reversal error to T1.TXT at script restart.
It turns out for select or it is fulfilled ignoring result of condition IF?
IF checked up works as well as it is expected.