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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are sql commands?

505


What has stored procedures in sql and how we can use it?

571


Why is the cursor important?

543


How many tables can a sql database have?

533


how does a local variable is defined using t-sql? : Transact sql

547






What are the commands used in sql?

527


What is the difference between stored procedure and view?

532


What is date functions?

577


What is cte?

576


what is heap table? : Sql dba

610


What action do you have to perform before retrieving data from the next result set of a stored procedure ?

2097


What is rowid in sql?

512


How do you declare a user-defined exception?

530


Does sql require a server?

532


How does postgresql compare to oracle/db2/ms sql server/informix?

572