How do I create a simple SELECT statement as a stored procedure in PL/SQL? - Regardless of the best practises around Stored Procs
So what is your question? You posted your answer already:

CREATE OR REPLACE PROCEDURE getStudents
AS
C1 SYS_REFCURSOR;
BEGIN
OPEN C1 FOR
SELECT * FROM DUAL;
DBMS_SQL.RETURN_RESULT(C1);
END;
/

Procedure created.

SQL&gt; exec getStudents

PL/SQL procedure successfully completed.

ResultSet #1

D
-
X

SQL&gt;