create procedure testExecution()
begin
declare @mysql LONG VARCHAR;
declare @suid integer ;
set @suid = 8886 ;
set @mysql='select * from tb_hse_staevent t '|| 'where t.suid='||@suid;
EXECUTE IMMEDIATE WITH RESULT SET ON @mysql ;
end
在begin上不加as,加了会报错
参考文档http://dcx.sybase.com/1201/zh/dbusage/ptei.html