这段Oracle代码错误在哪?怎么改?

create or replace procedure cunchu
(COL0 int,COL1 int,COL2 int,COL3 int,COL4 nvarchar2(4000),COL5 nvarchar2(4000),COL6 nvarchar2(4000),COL7 nvarchar2(4000),COL8 int,COL9 int,COL10 int,COL11 nvarchar2(4000))
as

Begin

CREATE TABLE temp
(
FACCOUNTID VARCHAR2 (132) , FACCOUNTNAME VARCHAR2 (768) ,
FACCOUNTNUMBER VARCHAR2 (240) , FACCOUNTDC INT, FNUMBER0 VARCHAR2 (240),
FLONGNUMBER0 VARCHAR2 (600) , FID0 VARCHAR2 (132),
FNAME0 VARCHAR2 (765) ,FBEGINBALANCEDEBITFOR DECIMAL (38, 4), FBEGINBALANCECREDITFOR DECIMAL
(38, 4),
FDEBITFOR DECIMAL (38, 4), FCREDITFOR DECIMAL (38, 4), FYEARDEBITFOR DECIMAL (38, 4),
FYEARCREDITFOR DECIMAL (38, 4),
FENDBALANCEDEBITFOR DECIMAL (38, 4), FENDBALANCECREDITFOR DECIMAL (38, 4), FLEVEL INT, FISLEAF
INT,
FORDERNUMBER VARCHAR2 (600)
);
/

CREATE TABLE temp1 (FNumber0 VARCHAR2 (720) , FLongNumber0 VARCHAR2 (1800) ,
FID0 VARCHAR2 (396) , FName0 VARCHAR2 (2295), FaccountNumber VARCHAR2 (720) ,
FaccountName VARCHAR2 (2304) , FaccountID VARCHAR2 (396) , faccountdc INT,
FBEGINBALANCEDEBITFOR DECIMAL (38, 4), FBEGINBALANCECREDITFOR DECIMAL (38, 4), FDEBITFOR
DECIMAL (38, 4), FCREDITFOR DECIMAL (38, 4),
FYEARDEBITFOR DECIMAL (38, 4), FYEARCREDITFOR DECIMAL (38, 4), FENDBALANCEDEBITFOR DECIMAL
(38, 4), FENDBALANCECREDITFOR DECIMAL (38, 4),
FLevel INT, FIsLeaf INT, FOrderNumber VARCHAR2 (1800));

/
declare P0 int:=COL0;P1 int:=COL1;P2 int:=COL2;P3 int:=COL3;
P4 nvarchar2(4000):=COL4;P5 nvarchar2(4000):=COL5;
P6 nvarchar2(4000):=COL6;P7 nvarchar2(4000):=COL7;
P8 int:=COL8;P9 int:=COL9;P10 int:=COL10;P11 nvarchar2(4000):=COL11;

begin
select * from dual;

end;
/
select * from temp1;
/
drop table temp;
drop table temp1;
/
end;

3个回答

不太清楚,来个同问吧。。。。。。。。。。。。。。。

很多错误,写两个明显会报错的吧
1.传入参数不能有长度
2.不需要declare

兄弟, 你这不是错误在哪 是正确在哪... 重新看看资料吧.

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!