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 |
What is $$ in sql?
What schema means?
What is the best sql course?
What is scope and visibility in PL/SQL?
diff b/w sub query and co-relater query?
What does “select count(*) from tab” result?
15 Answers IBM, Student, Wipro,
What is dynamic query?
what are the differences between require and include, include_once and require_once? : Sql dba
Can you have more than one trigger on a table?
Can we create foreign key without primary key?
1. is it possible to use the cursor atttibutes (%found ,% rowcount , %isopen , %notfound ) to our user defined cursor names ....... cursor cursor_name is select * from scott.emp if you use... cursor_name%found , %rowcount ,%isopen,%notfound...will it work... -------------------------- 2.what is the difference between the varray and index by table .. -------- 3. type type_name is table of number(8,3) index by binary_integer; identifier_name type_name; first , last , prior , next ,trim are the methods we can use it for the above type...simillary is there any way to apply for cursors... with thanks and regards..sarao...
explain the difference between myisam static and myisam dynamic. : Sql dba