How to Create a Stored Procedure in Oracle with Examples
The following stored procedure will add a new column called SOME_NEW_COLUMN with a NUMBER datatype to all tables in the current schema. This stored procedure does not take any parameters. CREATE OR REPLACE PROCEDURE ADD_COLUMN_STORED_PROCEDURE IS temp_String varchar2(200); temp_Table_Name varchar2(30); CURSOR cursor_User_Tables IS SELECT TABLE_NAME FROM USER_TABLES; BEGIN FOR rec IN cursor_User_Tables LOOP temp_Table_Name := [...]