company_after_insert.sql-사용않음-재활용용 565 B

12345678910111213141516
  1. drop trigger if exists company_after_insert;
  2. DELIMITER //
  3. create trigger company_after_insert after insert on dbr_company
  4. for each row begin
  5. if new.mobile_no != '' then
  6. insert into dbr_item_thm
  7. ( id, created_on, updated_on,
  8. member_buyer_id, seq_no, sort, contact_name, mobile_no
  9. )
  10. value
  11. ( NULL, UNIX_TIMESTAMP(), UNIX_TIMESTAMP(),
  12. new.id, 0, '0', new.company_name, new.mobile_no
  13. ) ;
  14. end if;
  15. end//
  16. DELIMITER ;