Write a simple Store procedure and pass parameter to it ?

Answers were Sorted based on User's Feedback



Write a simple Store procedure and pass parameter to it ?..

Answer / nikhil patel

CREATE OR REPLACE PROCEDURE test_new1(p_vari1 IN NUMBER


. ,p_vari2 IN
VARCHAR2)
AS
v_vari1 table.rollno%type;
v_vari2 table.name%type;


BEGIN
v_vari1 := p_vari1;
v_vari2 := p_vari2;
INSERT INTO table (
rollno
,name
)
VALUES (
v_vari1
,v_vari2
);

END;
/
COMMIT;




-- CALL PROCEDURE IN OTHER PL-SQL BLOCK

BEGIN

test_new1(0127,'nikhil');

END;
/

Is This Answer Correct ?    3 Yes 1 No

Write a simple Store procedure and pass parameter to it ?..

Answer / sanjay

Create Or Replace Procedure Test(p_Var1 In Number)
As
v_Var1 Number;
Begin
v_Var1 := p_Var1;
Dbms_Output.Put_Line(v_Var1);
Exception
When Others Then
Dbms_Output.Put_Line(Sqlerrm(Sqlcode));
End Test;
/

Is This Answer Correct ?    0 Yes 0 No

Write a simple Store procedure and pass parameter to it ?..

Answer / krishna

PARAMETERS <p>[(<length>)] [TYPE <type>|LIKE <obj>]
[DECIMALS <d>]
[DEFAULT <f>]
[MEMORY ID <pid>]
[LOWER CASE]
[OBLIGATORY]
[VALUE CHECK]
[AS CHECKBOX]
[RADIOBUTTON GROUP <radi>]
[NO-DISPLAY]
[MODIF ID <key>].

Is This Answer Correct ?    0 Yes 6 No

Post New Answer

More Oracle General Interview Questions

What is the difference between SQL, DDL, and DML?

7 Answers   BeBo Technologies, Wipro,


ur a sql devoloper...what is the process in ur company for finding the database BUGS .. seperate DB testers are there? or devr.s are manage? if DB TESTERS in there what is the process

0 Answers  


State the difference along with examples between Oracle 9i, Oracle 10g and Oracle 11i.

0 Answers   Atos Origin,


State some uses of redo log files?

0 Answers  


how to retrieve 1st and last row of table without using group functions??

6 Answers  






What is DTS and purpose of DTS ?

1 Answers   TCS,


What to do if dba lost the system password?

0 Answers  


Can you have more than one content canvas view attached with a window ?

0 Answers   Oracle,


what is unique key?

14 Answers   Amazon, Cap Gemini, Infosys, Wipro,


How to get last row id?

0 Answers  


What is the use of Control File ?

3 Answers  


How to define an oracle cursor variable?

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1789)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)