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

Answer Posted / pavan_1981

these two are used with cursors to store the returing
result from the query.
%TYPE:a variable is declared to be of %type when we are
referring to a single specific column.when we declare a
variable to be of %type of a column,the variable datatype
becomes the datatype of that column..here it can only one
datatype that of the column.

%ROWTYPE:same as above but takes a single row at a time and
can accomidate multiple datatypes.it can store whole row at
a time containing different datatypes.

Is This Answer Correct ?    83 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to use transactions efficiently : transact sql

550


How can you tell the difference between an index and a view?

494


Can we use pl sql in sql server?

541


Which join condition can be specified using on clause?

517


In pl/sql, what is bulk binding, and when/how would it help performance?

537






How to avoid using cursors?

599


Mention what does plv msg allows you to do?

669


Can we call stored procedure in function?

555


What is the primary use of normalization?

531


What is pivot in sql?

512


How do I sort a table in sql?

599


What are views in sql?

547


What does (+) mean in sql joins?

528


explain about mysql and its features. : Sql dba

554


What is serial sql?

529