what are %TYPE and %ROWTYPE? what is the difference?

Answer Posted / p.rajasekar

%RowType
1.%ROWTYPE is used to declare a record with the same types
as found in the specified database table, view or cursor.
Example:
DECLARE
v_EmpRecord emp%ROWTYPE;
2.Whenever we change the datatype in database,No need to
change in Application code using the %RowType, because
It will automatically take care of the dtatype change
%Type
1.%TYPE is used to declare a field with the same type as
that of a specified table's column. Example:
DECLARE
v_EmpNo emp.empno%TYPE;
2.Whenever we change the datatype in database,No need to
change in Application code using the %RowType, because
It will automatically take care of the dtatype change

Is This Answer Correct ?    25 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many types of literals are available in pl sql?

503


What has stored procedures in sql and how we can use it?

557


How long it takes to learn pl sql?

523


How to use boolean type in select statement?

569


What is left join in postgresql?

529






what is error ora-03113: end-of-file on communication channel?

589


What are the types of dbms?

539


What is a sql schema used for?

534


What is the difference between count 1 and count (*) in a sql query?

489


Is progress software supports to ( pl/sql )?

517


What is native sql query?

538


discuss about myisam key cache. : Sql dba

558


How do I create a sql database?

515


What is break?

606


What is normalization sql?

501