Differentiate between %type and %rowtype attribute in Oracle PL/AQL programming ?

Questions by skmishra_it

Showing Answers 1 - 5 of 5 Answers

rachana

  • Feb 19th, 2006
 

The %ROWTYPE is used to declare a record with the same datatype as found in specified database table,view or cursor...

v_emprec emp%ROWTYPE;

%TYPE is used to declare a column with same type as that of specified table's column

v_empno emp.empno%type;

  Was this answer useful?  Yes

Divesh

  • Apr 23rd, 2006
 

ROWTYPE is declared at the record level and the TYPE is declared for the coloumn levek

  Was this answer useful?  Yes

madhuri

  • Feb 13th, 2007
 

%type and %rowtype provides data independence,reduces maintainance cost and allows programs to adapt as the database changes due to new business requirements.%rowtype is used to declare a record with the same types as found in the specified database table,view or a cursor.%type is used to declare a field with the same type as found in the specified table's column.

  Was this answer useful?  Yes

srikanthvijay8

  • Jul 2nd, 2007
 

If you use a cursor, you can return cursor values only by rowtype only.

  Was this answer useful?  Yes

jiten

  • Aug 27th, 2007
 

%type will use for to define at column level.

%rowtype is used to define for one or more than one columns ( like row or record or tuple ) means its user define type which hold one or more than one columns along with it. and generally it used with Cursor.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions