Sunday, January 9, 2011

what is difference between %type and %rowtype

==>The %ROWTYPE attribute provides a record type that represents a row in a table.

    Create Type is used to create a type with multiple variables and is stored in the database.

==>%ROWTYPE is to be used whenever query returns a row of Database Table.

    RECORD TYPE is to be used whenever query returns a columns of different Tables.

    Eg :  TYPE <TYPE_NAME> IS RECORD (Name  Varchar2,No    Number);

No comments:

Post a Comment