Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- INSERT INTO transaction(transaction_id,borrower_id,book_id,librarian_id)
- VALUES('TR'||LPAD(transaction_transaction_id_seq.NEXTVAL,3,0),
- (SELECT borrower_id FROM borrower WHERE borrower_name Like 'Vincencius Kevin'),
- (SELECT book_id FROM book WHERE book_title LIKE 'Breaking Dawn'),
- (SELECT librarian_id FROM librarian WHERE librarian_name LIKE 'Steven Young')
- );
- UPDATE book
- SET stock = (SELECT stock FROM book WHERE book_title LIKE 'Breaking Dawn')-1
- WHERE book_title LIKE 'Breaking Dawn';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement