2024-10-24

注意事项

1 存储过程 参数名不可以和字段名相同(大小写也不可以)

2 字符串整型等参数的用法

if parm_id is NOT null
BEGIN
inparm_sql:=inparm_sql||' and "ID"='''||CAST(parm_id AS VARCHAR(50))||'''';
end;


if parm_deal_with_person<>''
BEGIN
inparm_sql:=inparm_sql||' and "DEAL_WITH_PERSON"='''||parm_deal_with_person||'''';
end;
if parm_less_warning_state is not null
BEGIN
inparm_sql:=inparm_sql||' and "WARNING_STATE"<='||parm_less_warning_state||'';
end;


3 返回自增索引序号

select 1 as "iResult",'新增完成' as "cResult",LAST_INSERT_ID as "Return_id";
return;


4 新建查询的 SQL语句 执行后需要点提交才生效(有疑惑)