【发布时间】:2020-02-19 21:39:24
【问题描述】:
我做了一个取值并生成表格的过程:
create or replace procedure offc.temp(data1 varchar2(200)) is
var1 varchar2(4000);
BEGIN
var1:='create table offc.temp'||data1||'(
id number)';
EXECUTE IMMEDIATE var1;
end;
我做这个程序时出错了:
[Warning] ORA-24344: success with compilation error
1/35 PLS-00103: Encountered the symbol "(" when expecting one of the following:
:= . ) , @ % default character
The symbol ":=" was substituted for "(" to continue.
(11: 0): Warning: compiled but with compilation errors
为什么会出现这个错误,因为我想通过将值传递给过程来创建表。
【问题讨论】:
-
只需将
varchar2(200)替换为varchar2
标签: oracle stored-procedures oracle11g