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 a database schema in oracle?

729


Assuming today is Monday, how would you use the DBMS_JOB package to schedule the execution of a given procedure owned by SCOTT to start Wednesday at 9AM and to run subsequently every other day at 2AM.

1593


What is an index associated with a constraint?

642


What is oracle host variable?

618


How many memory layers are in the oracle shared pool?

730






What are joins, explain all types of joins?

1819


Explain oracle’s system global area (sga).

702


What is recycle bin in Oracle?

794


How do I escape a reserved word in oracle?

727


What is sequence?

704


How do you find current date and time in oracle?

673


How to create a table interactively?

647


How many objectname will be created for a single table drop function? Why 'flashback' query giving error "ORA-38312: original name is used by an existing object" while getting the table?

1888


What is tns name?

631


I creat Credit memo in AR. Now i want revers the Credit Memo.how you can revers that what out any aditional entry.

1937