Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2011
    Posts
    17

    Unanswered: Stored Procedure

    Hi

    I have a database table App, with a primary key,AppID. So I need to insert Data in App, which will auto generate AppID.

    My Store Procedure goes something like this:

    AppID IN NUMBER
    , PersonID IN NUMBER
    , ContractorID IN NUMBER
    , erfNo IN VARCHAR2
    , streetNo IN VARCHAR2

    so I need a code to return AppID.

    Thanks in advance

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    I'd use a sequence. As it generates values automatically, no stored procedure is needed at all.

    Anyway: if you insist on a stored procedure and returning generated APPID (where to?), you'd have to create an OUT parameter.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •