Click here to Skip to main content
15,904,494 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
SQL
create or replace procedure ref_div
(
  pr_div_id OUT divisions.div_id%type,
  pr_divisions OUT divisions.divisions%type
)
IS
begin
  select div_id,
    divisions
  into 
    pr_div_id,
    pr_divisions
  from divisions;
end;
Posted
Updated 29-Mar-15 20:13pm
v2
Comments
Kornfeld Eliyahu Peter 30-Mar-15 2:15am    
In your SQL there is nothing about number of rows to return - it will select all the rows in the divisions table...
You need something like where clause or top statement to the the select query to return one and only one row...

1 solution

That isn't an "exact fetch" - it's a SELECT that doesn't have a WHILE clause, so it returns all the rows in the table.

If that isn't what you wanted, then you need to decide what condition will reduce the rows to the ones you want only, and as a WHILE clause to restrict it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900