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
how to select unique records from a table? : Sql dba
how many ways we can we find the current date using mysql? : Sql dba
How does join work in sql?
What does the acronym acid stand for in database management?
what is the command line end user interface - mysql? : Sql dba
Is left join same as inner join?
What is the difference between partitioning and sharding?
how many groups of data types? : Sql dba
What is nosql vs sql?
What does count (*) mean in sql?
Is oracle and sql same?
What is set serveroutput on in pl sql?
Why select is used in sql?
How do I make sql search faster?
What do you understand by case manipulation functions?