定义一个存储过程,以得到表中所有的记录。 程序总是提示“p_str :='select * from ' ||tableName||;” 出错。
--得到一个表的所有记录
  procedure getRecords(tableName in varchar2, records out SYS_REFCURSOR) as
      p_str varchar2(1000);
      
      begin
          p_str :='select * from ' ||tableName||;
          open records for p_str;/*返回游标*/
      end;