alter table inquire_answer add(english varchar(20));更改為:
execute immediate 'alter table inquire_answer add(english varchar(20))';
execute immediate 'alter table inquire_answer add(english varchar(20))';
要執行一個SQL數據定義語句(例如:create table ..,alter table ,drop table);
或執行一個數據控制語句(例如:grant...);
或一個會話控制(例如:alter session);
時要使用動態語句;
2.得到更多的靈活性,例如可能要在select語句中的where子句創建不同的搜索條件等等
execute immediate 'xxxx'這種格式在8i或以上才有
刚才按照您说的改了以后可以用,但是我改成了 as
BEGIN
execute immediate 'create table inquire_answer2( id number(4))';
commit;
exception
when others then
rollback;
raise;
end stp_inquire;之后,就说权限不足,请问如何付给我足够的权限呢?顺便告诉我那里给分
行号= 1 列号= 33 错误文本= PLS-00103: 出现符号 "GRANT"在需要下列之一时: ( ; is with authid as cluster compress order using compiled wrapped external determinist