plsql - I need to create a trigger to automatically increment the no_of_books in member table and book table -


upon issue, value of no_of_books must decremented in book table , incremented in member table

create or replace trigger trans_s_t3 after insert on trans_s  select member_s m1, book_s b1  each row  begin    update book_s , member_s    set no_of_books=:old.no_of_books - :new.no_of_books;   book_s=:new.book_no; end; 

do

 create or replace trigger trans_s_t3     after insert on trans_s      select member_s m1, book_s b1      each row      begin        update book_s        set no_of_books=:old.no_of_books - :new.no_of_books;       book_s=:new.book_no;  update  member_s        set no_of_books=:old.no_of_books - :new.no_of_books;       book_s=:new.book_no;     end; 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -