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
what is bdb (berkeleydb)? : Sql dba
What is the most restrictive isolation level? : Transact sql
How do I enable sql encryption?
What is the difference between in and between in sql?
Does truncate free space?
How many types of tables are there?
Define sql delete statement.
How many sql statements are used? Define them.
What is database migration?
Are stored procedures faster than queries?
Hi how to import oracle sequence in Informatica? Please write stored procedure code that will import oracle sequence in Informatica SP transformation as per below scenario Oracle table product list Pro_id, pro_name 101, LED Lights. 102, 20watt CFL Lights. 103, 30 watt CFL lights Now a new flat file with new product list needs to be added to oracle table product list with oracle sequence. flat file product Prono,pro_name, 1, 20 watt tube light 2, 30 watt tube light & target should be like 101, LED Lights. 102, 20watt CFL Lights. 103, 30 watt CFL lights. 104, 20 watt tube light 105, 30 watt tube light thks reg suvarna joshi suvarnaatsuvarna@rediffmail.com
Define commit, rollback and savepoint?
how to decrement dates by 1 in mysql? : Sql dba
what is a view? : Sql dba
What is auto increment in sql?