Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

can i use dbms_output.put_line in a function u are telling
as return statement

Answer Posted / gourvendra singh

Yes we can use the dbms_output.put_line in a function and
it will print the msg when we execute Function_name, it
will not display any value if we use the function to return
a value, consider the following code:
create or replace function abc_test return char is
a varchar2(20);
begin
select dname into a from dept where deptno=20;
dbms_output.put_line('the dept is ');
return a;
exception
when others then
a:='no dept';
dbms_output.put_line('the dept is ');
return a;
end;

this will work.

Is This Answer Correct ?    5 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

when MSQL8.0 is in market

2070


How many types of cursors supported in pl/sql?

1174


Explain architecture of sql server notification services?

1051


What is materialized view. What are different methods of refresh?

1377


Write a sql query to convert all character to uppercase after hypen.

1427


Explain what is a subquery ?

1182


What is posting?

1032


What are the events on which a database trigger can be based?

1178


When are we going to use truncate and delete?

976


what are the different type of normalization? : Sql dba

1022


how can we optimize or increase the speed of a mysql select query? : Sql dba

934


What is insert command in sql?

1118


What is sql resultset?

979


How to use boolean type in select statement?

1065


What is trigger in pl sql?

988