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
Explain 3 basic parts of a trigger.
How do I find duplicates in sql?
Is pl sql still used?
Is pl sql better than sql?
What is a file delimiter?
What is mutating error in pl sql?
Why do we use procedures in sql?
What are literals in sql server?
Why is sharding used?
What is record variable?
Is it possible to sort a column using a column alias?
mention if it is possible to import data directly from t-sql commands without using sql server integration services? If yes, what are the commands? : Transact sql
Which function is used to return remainder in a division operator in sql?
define data blocks ? : Sql dba
What is sql select statement?