What are % TYPE and % ROWTYPE ? What are the advantages of
using these over datatypes?

Answers were Sorted based on User's Feedback



What are % TYPE and % ROWTYPE ? What are the advantages of using these over datatypes?..

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

What are % TYPE and % ROWTYPE ? What are the advantages of using these over datatypes?..

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

What are % TYPE and % ROWTYPE ? What are the advantages of using these over datatypes?..

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

What are % TYPE and % ROWTYPE ? What are the advantages of using these over datatypes?..

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

Post New Answer

More SQL PLSQL Interview Questions

How does index help in query performance?

0 Answers  


what is a field in a database ? : Sql dba

0 Answers  


How many types of triggers exist in pl/sql?

0 Answers  


display records from 5 to 9 using rowid or rownum

5 Answers   Agile Software,


What is sql architecture?

0 Answers  






Mention what are the benefits of pl/sql packages?

0 Answers  


How to avoid duplicate records in a query?

0 Answers  


i need department wise top 2 employees salary.which logic i will use

17 Answers  


Can cursors be part of a trigger body?

0 Answers  


What is the difference between execution of triggers and stored procedures?

0 Answers  


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...

3 Answers   Satyam,


What are expressions?

0 Answers  


Categories