1:-How to write to update command in a procedure in oracle
which update two different table at a time

2:-How to write the select command in a procedure in oracle
which give multiple records

Answer Posted / guneetinder singh

update query depends upon no. of column two tables contain.

declare
salary number:=&salary;
procedure guneet(s in number) as
begin
update emp set sal = sal+s;
update gesture set sal1 = sal1+s;
end guneet;
begin
guneet(salary);
end;

--------------------------------------------------------------
declare
procedure multiple() as
begin
select * from emp;
end multiple;
begin
guneet();
end;

Is This Answer Correct ?    1 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is concurrency in oracle?

547


How do you get nicely formatted results from an oracle procedure that returns a reference cursor?

556


What is a dead lock in oracle?

598


What is oracle analytical function?

531


How to list all indexes in your schema?

584






Explain the use of consistent option in exp command.

552


How can Oracle users be audited?

610


Explain integrity constraints?

669


Explain oracle’s server parameter file.

567


Can we create trigger on materialized view in oracle?

567


How to omit columns with default values in insert statement in oracle?

579


How to define an anonymous procedure with variables?

545


What is a database table in oracle?

573


How will you differentiate between varchar & varchar2?

592


Why do we need integrity constraints in a database?

588