Ask Question
14 October, 15:12

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

+3
Answers (2)
  1. 14 October, 16:15
    0
    Answers ehowhejej
  2. 14 October, 17:36
    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?
Get 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 there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers