Ask Question

Create a statement trigger called "bt_maj_adv_trigger" that would be work with both advisor as well as major table. If a record is inserted, deleted or updated in either of the table, the system will insert the user name, table name, date, and the dml command executed on the table. To insert this information, create an appropriate "log_maj_adv" table first before you create the trigger

+4
Answers (2)
  1. 10 November, 06:27
    0
    Create or replace trigger at_advisor

    after delete or insert or update on advisor

    for each row

    Begin

    if inserting

    then

    insert into

    log_maj_adv

    values

    (

    user, : new. adv_code, sysdate, 'insert'

    )

    ;

    elsif deleting

    then

    insert into

    log_maj_adv

    values

    (

    user, : new. adv_code, sysdate, 'delete'

    )

    ;

    else

    insert into

    log_maj_adv

    values

    (

    user, : new. adv_code, sysdate, 'update'

    )

    ;

    end if;

    End;

    Explanation:

    as per above answer.
  2. 10 November, 06:39
    0
    Answers ehowhejej
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Create a statement trigger called "bt_maj_adv_trigger" that would be work with both advisor as well as major table. If a record is ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers