In MS SQL Server you can declare local variables of any primitive type or table type. This table is a regular table in which you can run SELECT , INSERT , UPDATE and DELETE , like any other table, except that it is a local variable and not part of the database itself.
I am trying to do the same in Firebird, but it does not seem like syntax.
declare variable value int; --works fine declare variable values table (value int); --Error: "Token unknown (table)"
Is there any way to do this? (And before anyone says “use selective stored procedure”, this will not work. I need something that I can dynamically run INSERT and SELECT on.)
source share