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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

type vs rowtype

natpidgeonOct 24 2013 — edited Oct 24 2013

     this must be one of the most ask question, from research i done

just to get it straight here is a example

(

    pnLeadID          p_lead.lead_id%TYPE ,

  )

  IS

    v_lead_rec           p_lead%ROWTYPE;

   v_lead_rec       := dml_p_lead.get_rec(pnLeadID);

-- %TYPE is used to declare a field with the same type as

-- that of a specified table's column:

-- %ROWTYPE is used to declare a record with the same types as

-- found in the specified database table, view or cursor:

so pnleadid it gets the collumn in p_lead table

so for v_lead_rec is saying what ever is in the collumn pnleadid =v_lead_rec


did i get it right ? correct me if im wrong

thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 21 2013
Added on Oct 24 2013
2 comments
505 views