FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


some pl/sql help please





Jurado
Hello,

what is the difference between %type and %rowtype?

Can someone specify with an easy example,

I have tommorow test of it but didn t pay much attention in the lessons.

Greats,
mathiaus
Have you bothered to search? I've found the result as #1 in google using '%type and %rowtype' as my search query Rolling Eyes
Jurado
i tried to google it several times, but dont understand it, and my google isnt good as your google i think.


the %type is i think clear but the %rowtype isnt clear, if i declare some columms wich type will be used?

Greats,
kv
I tried googling too. Looks like my google is also a good one Smile . This is the first link I got in the result.

http://orafaq.com/faq/what_is_the_difference_between_type_and_rowtype

Basically, %type is a type of the column and %rowtype is the type of a row (or record).

When you want a variable to hold one entire row of a given table, you will declare it as %rowtype of that table. For example, if you have a table users and there is a variable currentuser which should hold a record of one user, you will declare it as

Code:
currentuser user%rowtype;
Related topics
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.