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
How many types of literals are available in pl sql?
What has stored procedures in sql and how we can use it?
How long it takes to learn pl sql?
How to use boolean type in select statement?
What is left join in postgresql?
what is error ora-03113: end-of-file on communication channel?
What are the types of dbms?
What is a sql schema used for?
What is the difference between count 1 and count (*) in a sql query?
Is progress software supports to ( pl/sql )?
What is native sql query?
discuss about myisam key cache. : Sql dba
How do I create a sql database?
What is break?
What is normalization sql?