How to make procedure that update 5 table's ?
for ex:
....update table1 set field1 = .......
....update table2 set field2 = .......
....update table3 set field3 = .......
in oracle 10g - pl/sql
How to make procedure that update 5 table's ?
for ex:
....update table1 set field1 = .......
....update table2 set field2 = .......
....update table3 set field3 = .......
in oracle 10g - pl/sql
CREATE OR REPLACE MY_PROCEDURE ( [parameter(s) here...]) AS
BEGIN
UPDATE TABLE_1 SET...;
UPDATE TABLE_2 SET...;
UPDATE TABLE_3 SET...;
UPDATE TABLE_4 SET...;
UPDATE TABLE_5 SET...;
END;
If you don't need parameters, then you can either run them as an anonymous procedure:
BEGIN
UPDATE MEN SET fname = 'X';
UPDATE WORK SET fname = 'Y';
END;
...or execute each procedure individually. You could just put the UPDATE statements, line by line, in a file & run it.