SQL> create or replace procedure z_counts is 2 z_counts number 3 select count(*) into z_counts from message where pub_date> to_date(to_char(sysdate,'yyyy-m m-dd'),'yyyy-mm-dd'); 4 end; 5 /警告: 创建的过程带有编译错误。 那这怎么不行啊》?
create or replace procedure z_counts is z_counts number; --少了;号 select count(*) into z_counts from message where pub_date > to_date(to_char(sysdate,'yyyy-m m-dd'),'yyyy-mm-dd'); end; /
SQL> create or replace procedure z_counts is 2 z_counts number; begin 3 select count(*) into z_counts from message where pub_date> to_date(to_char(sysdate,'yyyy-m m-dd'),'yyyy-mm-dd'); 4 end; 5 /
2 z_counts number
3 select count(*) into z_counts from message where pub_date> to_date(to_char(sysdate,'yyyy-m
m-dd'),'yyyy-mm-dd');
4 end;
5 /警告: 创建的过程带有编译错误。
那这怎么不行啊》?
z_counts number; --少了;号
select count(*) into z_counts from message where pub_date > to_date(to_char(sysdate,'yyyy-m
m-dd'),'yyyy-mm-dd');
end;
/
2 z_counts number;
begin
3 select count(*) into z_counts from message where pub_date> to_date(to_char(sysdate,'yyyy-m
m-dd'),'yyyy-mm-dd');
4 end;
5 /