0

I have 3 tables:

data(operation_name,table_name,operation_date,prim_key)
table2(col1,col2,col3,col4)
table3(col1,col2,col3,col4)

I need a trigger which will populate data table whenever an operation(insert,update or delete) is done on table2 or table3.

In data table:

operation_name>> name of DML statement(insert, update or delete) done on table1 or table3

table_name>> name of table on which operation is done.

operation_time>> date at which operation is done.

prim_key>> it should automatically display the primary key of the table on which operation is done.

I am very new to pl/sql and trying various things, but none of them are working.

APC
  • 144,005
  • 19
  • 170
  • 281
shubham
  • 33
  • 1
  • 9
  • 2
    Why don't you show us what you have tried, and what's not working? – eaolson Nov 23 '18 at 21:11
  • @eaolson i tried from this [link](https://stackoverflow.com/questions/741414/insert-update-trigger-how-to-determine-if-insert-or-update) – shubham Nov 23 '18 at 21:27
  • 1
    Again, show what you've done that isn't working. – eaolson Nov 23 '18 at 22:48
  • 1
    Welcome to Stack Overflow. [It's Not Working](http://idownvotedbecau.se/itsnotworking) can get you downvoted because people like to see some code they can fix. Also the link you posted is for Microsoft SQL Server, but you mentioned PL/SQL so it looks like you're using Oracle. – William Robertson Nov 24 '18 at 09:46

0 Answers0