BEGIN
newId INTEGER
select Base_ID.nextval INTO newId from dual;insert into Base(ID) values(newId);END
但是报错[Err]
PLS-00103: Encountered the symbol "INTEGER" when expecting one of the following: := . ( @ % ;
The symbol "; was inserted before "INTEGER" to continue.PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: ; <an identifier> <a double-quoted delimited-identifier>
The symbol ";" was substituted for "end-of-file" to continue.
newId number(18);
BEGINselect Base_ID.nextval INTO newId from dual;
insert into Base(ID) values(newId);
END;PL/SQL所有变量必须声明在declare和begin之间,和T-SQL不一样。