0

//Hi,
//i create following table


Table name : person
ID AGE FNAME LNAME
1 10 Geek Greek
2 20 Seek Bells
3 30 Creek Dells
4 40 Sreek Sells[/B]

// I wrote following procedure which is run successfully.

Create or replace procedure proc1 as cursor person_cursor (pAge number) is select * from person p where p.age=pAge;
Begin
For I in person_cursor(30)
Loop
Dbms_output.put_line(i.fname);
End loop;
End proc1;


// but, to see output i must write "set serveroutput on" in sql stmt. Please tell me why we use "set serveroutput on" into prog.?
//Please tell me the neccesity of this line?

Thanks & regards,
Pooja

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by deolalkar_pooja
0

That is required only if you are using SQL * Plus. serveroutput is a environment variable. It must be switched ON to use the screen buffer and display the output on screen.

Edited by debasisdas: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.