adspace


Explain the purpose of %type and %rowtype data types with the example?

Answer Posted / Ravindra Kumar Sagar

%TYPE is a PL/SQL construct that creates a variable of the same type as an existing database object (column, table, or package). %ROWTYPE is a PL/SQL record type corresponding to a table in the database. Example:DECLARE v_student student%rowtype; BEGIN SELECT * INTO v_student FROM student WHERE id = 1; END;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the best sql course?

1064


what is collation? : Sql dba

1242


What is the current version of sql?

1106


how many tables will create when we create table, what are they? : Sql dba

1156


Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me

2102


Is primary key clustered index?

1028


How do I remove duplicates in two columns?

1202


Is primary key always clustered index?

1101


what is sql server agent? : Sql dba

1189


Is inner join faster than left join?

1287


what is schema? : Sql dba

1163


Can we use distinct and group by together?

1147


Can we rollback truncate?

1083


what is dbms? : Sql dba

1070


what is bcp? When does it used? : Sql dba

1065