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
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 |
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 |
Why do we need view in sql?
what are the maximum number of rows that can be constructed by inserting rows directly in value list? : Transact sql
What are different types of sql commands?
What does subquery mean in sql?
what is the difference between group by and order by in sql? : Sql dba
write a query to display diference between two dates in sql server
What is a behavioral trigger?
With out using count() function. How to the find total number of rows in a table?
Does postgresql run on the cloud?
How do I delete a trigger?
Explain what is a view?
Can two tables have same primary key?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)