Stack Exchange
PL/SQL procedure to move all data from one table to another
I wrote a procedure to move data from one table to another
CREATE OR REPLACE PROCEDURE DATA_INSERT_TEST

( P_COLUMN_A IN TABLE_2.COLUMN_1%TYPE,
  P_COLUMN_B IN TABLE_2.COLUMN_2%TYPE,
  P_COLUMN_C IN TABLE_2.COLUMN_3%TYPE,
  P_COLUMN_D IN TABLE_2.COLUMN_4%TYPE,
  P_COLUMN_E IN TABLE_2.COLUMN_5%TYPE,
  P_COLUMN_F IN TABLE_2.COLUMN_6%TYPE,
  P_COLUMN_G IN TABLE_2.COLUMN_7%TYPE )
 
IS
BEGIN

INSERT INTO USER_NAME.TABLE_2 (COLUMN_1, COLUMN_2, COLUMN_3, COLUMN_4, COLUMN_5, COLUMN_6, COLUMN_7)
VALUES (COLUMN_A, P_COLUMN_B, P_COLUMN_C, P_COLUMN_D, P_COLUMN_E, P_COLUMN_F, P_COLUMN_G);

     COMMIT;  
END;

The procedure above works but it only returns one row at a time. I need a procedure that is going to extract all of that data at one time and not just one row at a time. I am using Oracle 19c and Sql developer as my tool.

why would you need a pl/sql procedure?  just do a INSERT INTO.. SELECT   https://www.w3schools.com/sql/sql_insert_into_select.asp

@OldProgrammer the tables do not have the same number of columns I will try it but then i have to set the where condition as well?

@OldProgrammer yes this answered my question thank you
