Subject Re: [firebird-support] Re: Trigger variable in function parameter
Author Martijn Tonies
>> When using variables/parameters in SQL statements, always include the
>> ":", in other statements, don't use them.
>
>Are there any difference between these selects:
>--------
>select
> field1
>from
> table1
>into
> my_variable;

If this happens to work, it's un-documented to do so.

>--------
>select
> field1
>from
> table1
>into
> :my_variable;
>--------

This is the preffered way to do it, if your 1st statement works.

>Are they identical? If they are identical this can be very confusing
>for learning triggers. In manual I found that variable should be with ":".

Naah, not confusing at all: in SQL statements (select/insert/update/delete
or "for select"), use the ":" when addressing variables/parameters, in other
situations, don't.


Martijn Tonies
Database Workbench - development tool for Firebird and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com