Select all from table Oracle

2019-06-05 03:50发布

问题:

I wrote a stored procedure to select all records from a table. Since I'm new to Oracle I have few questions.

  1. Is this Correct?
  2. Is this the best way to select all records from a table?
  3. How can I view result in SP in DB level?
alter PROCEDURE employee_getall
(

 cv_results in out sys_refcursor
)
IS
BEGIN
open cv_results for
   select *
    from employee_master
EXCEPTION
WHEN OTHERS THEN
    NULL ;
END;