Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Assign varchar parameter length in stored proc.

hi.shobhit76Jul 3 2009 — edited Jul 5 2009
Hi all,

How do i assign length of the input parameters specially the varchar2 data type one's : Also how do i assign default value for character type parameters(I know how to give default NULL but if i have to initialise a character with some default string , then how to do that ? ) Please help !!

Here is my procedure which is giving the error :

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

CREATE OR REPLACE PROCEDURE proc_MDM_InsertCntryDetails
(
CntryMasterCode IN VARCHAR2(50),
CntryName IN VARCHAR2(50),
User IN VARCHAR2(50),
Exist INTEGER,
status VARCHAR2(50),
Inserted_By VARCHAR2(50) DEFAULT 'IT',
)

IS

BEGIN

Insert into MDM_COUNTRY_MASTER(MDM_CODE) VALUES(3);


EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL;
WHEN OTHERS THEN
-- Consider logging the error and then re-raise
RAISE;

END proc_MDM_InsertCntryDetails;
/

Help much appreciated .

Thanks

Shobhit
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 2 2009
Added on Jul 3 2009
7 comments
2,349 views