Skip to content
Advertisement

How to insert from old table to new table using trigger in pl/sql

There is a column which calls as text (column’s name) inside a table. I want to create different columns from this column. How to insert to another table these columns using trigger. I tried few triggers for this, but i got error. I splitted columns as below.

After that, i created a new table existing 3 columns. How can i fill that new table after any changing in old table?

Can someone help me this issue? Thanks in advance.

Trigger i got error is as below. Table1 has text column, New table i created is table2.

Advertisement

Answer

Access the row that is being inserted with :new (resp. new without the colon in the WHEN clause). You cannot commit inside the trigger; its insert will be commited or rolled back with the transaction it occurs in.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement