title: Inserting an "INTO" clause to a package body
body: <p>I have this package called <code>reg_user</code> I need to make a query that could select all the items in the table in returning it to the <code>java</code> program (using <code>jdbc</code>) so what will I need in order to return a value to be used in the java program? Here's my code:</p>
  
  <pre><code>CREATE OR REPLACE
  PACKAGE BODY reg_pack
  AS
  PROCEDURE addUser(
      c_fname user_profile.firstname%type,
      c_lname user_profile.lastname%type,
      c_cnum user_profile.contactno%type,
      c_dob USER_PROFILE.DOB%type,
      c_address user_profile.address%type,
      c_city user_profile.city%type,
      c_state user_profile.state%type,
      c_country user_profile.country%type,
      c_email user_profile.emailid%type,
      c_password user_profile.password%type,
      c_usertype user_profile.usertype%type,
      c_username user_profile.username%type)
  IS
  BEGIN
    INSERT
    INTO USER_PROFILE
      (
        userid,
        firstname,
        lastname,
        contactno,
        dob,
        address,
        city,
        state,
        country,
        emailid,
        password,
        usertype,
        username
      )
      VALUES
      (
        userid_seq.NEXTVAL,
        c_fname,
        c_lname,
        c_cnum,
        c_dob,
        c_address,
        c_city,
        c_state,
        c_country,
        c_email,
        c_password,
        c_usertype,
        c_username
      );
  END addUser;
  PROCEDURE delUser
    (
      c_id user_profile.userid%type
    )
  IS
  BEGIN
    DELETE FROM USER_PROFILE WHERE user_profile.userid = c_id;
  END delUser;
  PROCEDURE selectUser(
      c_id user_profile.userid%type)
  IS
  BEGIN
    SELECT USERID ,
      FIRSTNAME ,
      LASTNAME ,
      CONTACTNO ,
      DOB ,
      ADDRESS ,
      CITY ,
      STATE ,
      COUNTRY ,
      EMAILID ,
      PASSWORD ,
      USERTYPE ,
      USERNAME SERID ,
      FIRSTNAME ,
      LASTNAME ,
      CONTACTNO ,
      DOB ,
      ADDRESS ,
      CITY ,
      STATE ,
      COUNTRY ,
      EMAILID ,
      PASSWORD ,
      USERTYPE ,
      USERNAME
    FROM USER_PROFILE
    WHERE user_profile.userid = c_id;
  END selectUser;
  END reg_pack;
  </code></pre>