-- Created on 2017/4/8 by ADMINISTRATOR
declare
-- Local variables here
v_sql varchar2(300);
v_deptno teacher.deptno%type:=308;
begin
-- Test statements here
v_sql := 'update teacher set sal=sal+100 where deptno=:1 ';
/* if v_dept is not null then
v_sql := v_sql ||' and deptno ='||v_dept;
end if;
if v_name is not null then
v_sql := v_sql ||' and tname ='''||v_name||'''';
end if;
if v_gender is not null then
v_sql := v_sql || ' and gender='''||v_gender||'''';
end if;*/
execute immediate v_sql;
using v_deptno;
end;
怎么老是出错 什么问题啊
呦呦米