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
Can we use pl sql in mysql?
What is native sql query?
What does desc stand for?
Which operator is used in query for pattern matching?
What is normalization in sql?
Is left join faster than inner join?
What do you mean by “trigger” in sql?
what does the t-sql command ident_incr does? : Transact sql
discuss about myisam index statistics collection. : Sql dba
What are different categories of sql commands?
what are different types of collation sensitivity? : Sql dba
What does dml mean?
Does sql require a server?
Determine if oracle date is on a weekend?
What are the uses of sysdate and user keywords?