Q
Problem solve Get help with specific problems with your technologies, process and projects.

Updating rows with %rowtype

Can we update rows with the help of %rowtype?

Can we update rows with the help of %rowtype?
Yes.

Example:

 
Declare
  
    ---- Define a varibable with a record type
employee employee%rowtype;
 
begin
 
    ---- initialize field values
employee.empno := 1;
employee.first_name := 'Greg';
employee.last_name := 'Williams';
employee.country := 'USA';
 
--insert into the table
 
insert into employee values 
( employee.empno,
   employee.first_name,
   employee.last_name,
   employee.country );
 
commit;
 
end;
/

Dig Deeper on Using Oracle PL-SQL

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close