Subject Re: [Firebird-Architect] Exec. statement parameters
Author Vlad Khorsun
> Vlad Khorsun escreveu:
>> ...
>>> Named parameters is good feature, but what about the syntax in the sample, O
>>> also do not like it. If we use named parameters, it should be something like:
>>> S = 'INSERT INTO TTT VALUES (:a, :b, :a)';
>> Hmm... now i see where confusion is. I'll look how to implement such syntax
> This is one of the confusions. :-)
> Note that I see no reason to reject such type of code:
> execute block
> as
> begin
> insert into t values (?)
> end;
> I.e., have parameters direct inside EXEC. BLOCK instead of need to
> declare variables.

EXEC BLOCK was created looking at stored procedures. I believe it have
good syntax and it not needs to be changed. Explicitly named parameters
always better than implicit unnamed ones, i believe.

> Then imagine you use colon there. You can't know if you refer to local
> variable or parameter. (unless we make explicit that locals variables
> have precedence)

As we not going to change EXEC BLOCK syntax we have no such problem

> Oracle uses this colon syntax for names parameters, but local variables
> are not accessed with it.

We also allow to use local variables without markers in many (not in all) cases