Ask Question
29 March, 17:17

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. 29 March, 20:57
    0
    Answers ehowhejej
  2. 29 March, 20:57
    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.
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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers