Write a simple Store procedure and pass parameter to it ?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
What is the difference between 10g OEM and 11g OEM?
How to create id with auto_increment on oracle?
what is unique key?
14 Answers Amazon, Cap Gemini, Infosys, Wipro,
what is the difference between table and veiw?
What is the usage of control file in oracle?
What is SYSTEM tablespace and When is it Created?
What is mean by Program Global Area (PGA) ?
how do u know the total no of rows in a table?
Explain the blob datatype?
I know that i can create a table without a primary key.But is there any significance for that table???? while creating an application.
What are triggers in oracle?
How to synchronize 2 schema's objects?