What are % TYPE and % ROWTYPE ? What are the advantages of
using these over datatypes?
Answers were Sorted based on User's Feedback
Answer / swapna
"% Type "is used to extract definition of the column of a
table.
"%Rowtype" is used to extract definition of the columns of
all columns.
Is This Answer Correct ? | 6 Yes | 1 No |
Answer / nakul.v
%TYPE provides the data type of a variable or a database
column to that variable.
%ROWTYPE provides the record type that represents a entire
row of a table or view or columns selected in the cursor.
The advantages are :
I. Need not know about variable's data type.
II.If the database definition of a column in a table
changes, the data type of a variable changes accordingly.
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / nishi
%TYPE provides the data type of a variable or a database column to that variable.
%ROWTYPE provides the record type that represents a entire row of a table or view or columns selected in the cursor.
The advantages are :
I. Need not know about variable's data type.
II.If the database definition of a column in a table changes, the data type of a variable changes accordingly.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / manoj
"%Type" :-It reffer one datatype which take
data type of a column in table,
Previously defined variable(Anchor type)
"%Rowtype" :-Have all type Refered May be for
Table,
Cursor,
Ref Cursor,
curor variable etc.
Is This Answer Correct ? | 1 Yes | 2 No |
How does index help in query performance?
what is a field in a database ? : Sql dba
How many types of triggers exist in pl/sql?
display records from 5 to 9 using rowid or rownum
What is sql architecture?
Mention what are the benefits of pl/sql packages?
How to avoid duplicate records in a query?
i need department wise top 2 employees salary.which logic i will use
Can cursors be part of a trigger body?
What is the difference between execution of triggers and stored procedures?
1. how to use the check option constraints in sql query..? 2.how to add data in a complex query ? 3.is it possible to use commit or rollback or savepoint in triggers...if not why please explain with examples...? 4.what is the difference between meterialized view and normal view..how to create materialized view and how to use it..? 5.what is varray...? what is the advantage of the varray ? please expalin with a simpel example..i want to load into a table (student no and name and his marks..) please give example.. 6.what are the bulk bind exceptions...how to use bulk bind and how to use bulk collect..please explain with example... 7.what is for update of and where current of ...? 8 what is the use of nowait ? 9.please give an example for nocopy in a simple plsql query 10.create an index in a table...tellme how to use the index in a where clause to do performance tunning...
What are expressions?