我正在尝试在存储过程中执行一些 SQL,在运行时设置表,并返回选定的值:
create or alter procedure TEST3
returns (
THE_VAR varchar(128))
as
declare variable TABLE_NAME varchar(64);
declare variable STMT varchar(128);
begin
/* Procedure Text */
Table_Name = 'users';
stmt = 'select firstname from ' || :table_name || ' where userid = 2 into :the_var';
execute statement stmt;
suspend;
end
结果是Token unknown ...... into
.
谁能告诉我它有什么问题?