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 |
Is left join same as join?
How many types of tables are there?
Explain 3 basic parts of a trigger.
Is nosql faster than sql?
Is sql port 1433 encrypted?
I have a table .in the table 100 recored is there .we have get the single row with out using clause..
what are the different types of joins?
If I have a table T with 4 rows & 2 columns A & B. A has values 1,2,3,4. and B has 10,20,30,40. Write an Update SQL query which can Swap the values of A & B for all records. (Do not use a sub-query)
What is rank dense_rank and partition in sql?
what is the difference between binary_integer and pls_integer
Why do we use subquery?
If records are inserted into table without committing.How to refer to these values in a procedure?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)