类型:转载 责任编辑:asp.net 日期:2007/05/23
热门软件下载:
create or replace procedure testselect is
begin
select * from g_language
end ;
===========================================
Compilation errors for PROCEDURE IN_USER.TESTSELECT
Error: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
begin case declare end exception exit for goto if loop mod
null pragma raise return select update while with
<an identifier> <a double-quoted delimited-identifier>
<a bind variable> << close current delete fetch lock insert
open rollback savepoint set sql execute commit forall merge
<a single-quoted SQL string> pipe
Line: 5
网友回答:
oracle中的pl/sql中使用select 要用into变量的形式:
create or replace procedure testselect(p_out out number) is
v_count number;
begin
select count(*) into v_count from g_language; <--要加分号
p_out:=v_count; <--返回值 ,当然你还可以进行其他操作
end ;
--看pl/sql基础类的书,入门会快些.
create or replace procedure testselect(p_out out number) is
v_count number;
begin
select count(*) into v_count from g_language;
p_out:=v_count;
end ;
/
create or replace procedure aa is
a varchar2(10);
begin
select id into a from tablename
end ;