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

Is not null in sql?

994


Why we use triggers in mysql?

992


What is the purpose of the sql select top clause?

1110


What is sql in oracle?

1061


How do I view a sql trace file?

1025


How many parts of a pl sql block are optional?

1130


What is the most restrictive isolation level? : Transact sql

1083


Why plvtab is considered as the easiest way to access the pl/sql table?

1214


what are all different types of collation sensitivity? : Sql dba

982


How many databases can sql express handle?

984


How do I get sql certification?

971


Can we use the cursor's to create the collection in PL/SQL?

1025


what is data control language? : Sql dba

1024


What is sql*plus?

1075


Is sql port 1433 encrypted?

1023