我有以下不能编译的小功能:
function f_query_01 Return interval Day to second is start_time timestamp(3); end_time timestamp(3); time_diff interval Day to second; c_query_number number; begin start_time := systimestamp; select count(*) into c_query_number from wg; <--This is the line that errors out end_time := systimestamp; time_diff := start_time - end_time; return time_diff; end f_query_01;
编译器给我以下错误:
Error(29,3): PL/sql: sql Statement ignored Error(29,44): PL/sql: ORA-04044: procedure,function,package,or type is not allowed here