Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Creating stored procedure

8a4589dc-fc34-47e6-b470-53597b99558eSep 4 2015 — edited Sep 4 2015

Hi All, I am a new oracle user and i needed some help please.

I have a table called staff with info such as name, grade etc.

I want to create a stored procedure so grade was a parameter and it will bring back staff at that grade.

For example the simple SQL would be select firstname, lastname FROM staff where grade = 1


How would i go about creating a stored procedure so i could use grade as a parameter.


Would it be something like this:


Create or replace procedure grade.proc

(grade AS number)

IS

Begin


?


Thank you for your help, i am sorry for this is very basic.

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 2 2015
Added on Sep 4 2015
4 comments
269 views