title: Creating triggers in oracle
body: <p>Please help me to resolve the below problem</p>
  
  <p>I need to Create a trigger named <code>trigger_contact_af_update</code> that is triggered whenever the "contact" table is updated. This trigger will insert the org_name and action into the table <code>contact_log_history</code> after the updation of contact details. The action name in the affected log table <code>contact_log_history</code> is <code>After_Update_Contact</code>. </p>
  
  <p>Hints:
  Trigger name : trigger_contact_af_update
  Table name : contact_log_history
  Field names : org_name,action
  Action  : 'After_Update_Contact'.</p>
  
  <p>The table structure of contact_log_history is as follows:
  org_name varchar(30)
  action varchar(30)</p>
  
  <p>The table structure of contact is as follows:</p>
  
  <p>id is the primary key in contact table</p>
  
  <p>id              integer
  org_name        varchar2(255)
  street_address1 varchar2(255)
  street_address2 varchar2(255)
  city            varchar2(255)
  state           varchar2(255)
  postal_code     varchar2(255)
  country_code    varchar2(255)
  last_name       varchar2(255)
  first_name      varchar2(255)
  person_title    varchar2(255)
  phone_country_code   integer
  phone_area_code      integer
  phone_number         varchar2(255)
  email                varchar2(255)
  created_time         timestamp</p>
  
  <p>I have created the trigger as below, but while executing it is not returning any error message nor creating the trigger. Please let me know the error in the creation of trigger / the correct statement</p>
  
  <pre><code>CREATE OR REPLACE TRIGGER trigger_contact_af_update
  AFTER UPDATE
     ON contact
  FOR EACH ROW
  DECLARE
  BEGIN
  INSERT INTO contact_log_history
     (org_name,
       action)
  select org_name, 'contact_log_history' 
  from contact 
  END;
  </code></pre>