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

Differentiate between pl/sql and sql?

0 Answers  


what is the bond code in materialized view?

0 Answers  


Is drop table faster than truncate?

0 Answers  


What is a sql select statement?

0 Answers  


Can we use rowid as primary key?

0 Answers  






what is the difference difference between procedure and packages

2 Answers   3i Infotech, Oracle,


What is the left table in sql?

0 Answers  


What are different types of queries in sql?

0 Answers  


wt is the diff b/w greast and max ,least and min? wt is the diff b/w case and decod?

4 Answers   Oracle, TCS, Tecnics,


What is difference between table and view?

0 Answers  


How to get second highest salary from a table

3 Answers  


4. Select sum(A.salary) +sum(B.salary) as TOT_SAL from ( select LEVEL emp_id,level*100 salary,case when mod (level,2)=0then 2 else null end dept_id from dual connect by level<6 )A right outer join (select level emp_id ,level*200 salary ,case when mod (level,3)=0 then 2 else null end dept_id from dual connect by level<6)B On A.dept_id=B.dept_id And A.emp_id=B.emp-id;

1 Answers   Fintellix,


Categories