write a procedure to print a statement or number not
using "dbms_output.put_line" package.write a procedure
instead of it using procdure name as "print"
ex:-

declare
a number:=2;
begin
print(a);
end;
/* when U type above procedure 2 have to should be printed*/

Answers were Sorted based on User's Feedback



write a procedure to print a statement or number not using "dbms_output.put_line" packa..

Answer / chandra shekhar

As you said that DBMS_OUTPUT.PUT_LINE should not be used in given piece of your program, so it can be done by creating a procedure by name print as follows

create or replace procedure print(n number)
as
begin
dbms_output.put_line(n) ;
end ;

and then executing your piece of code i.e.

declare
a number:=2;
begin
print(a);
end;

Hope this is what u r question reflects ?

Is This Answer Correct ?    3 Yes 2 No

write a procedure to print a statement or number not using "dbms_output.put_line" packa..

Answer / amit kumar(patna)

We have to create procedure for print and called the SP for print any message
create or replace procedure print(n varchar)
as
begin
dbms_output.put_line(n) ;
end ;

set serveroutput on
declare
a number;
begin
a:=20;
print(a);
end;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

What is sql query limit?

0 Answers  


Can we rollback after truncate?

0 Answers  


what is the use of anchoring object? what r the difference between anchoring object & enclosing object? can any one tell me all the details?

0 Answers  


How to fetch values from testtable1 that are not in testtable2 without using not keyword?

0 Answers  


How do you declare a constant?

0 Answers  






How do I view tables in mysql?

0 Answers  


can sql servers linked to other servers like oracle? : Sql dba

0 Answers  


write a query to delete similar records in same table

13 Answers   TCS,


what is try_catch block in procedure

0 Answers  


What is difference between hql and native sql?

0 Answers  


Is sql injection illegal?

0 Answers  


Why cross join is used?

0 Answers  


Categories