I am learning more on SQL but this one got me confused. The instructions says: Create and test a stored procedure called checkout_transaction that processes a “checkout” transaction. When a book is checked out, a new CHECKOUT record is inserted and the Pat_ID attribute in the BOOK table is updated to identify which patron has checked out the book. The entire transaction (starting with START TRANSACTION; and ending with COMMIT;) should be in between the BEGIN and END statements of the stored procedure. You should be able to call the procedure with a statement like this, passing the values of the Book_Num, Pat_ID, Check_Out_Date and Check_Due_Date to the procedure: CALL checkout_transaction(5243, 1170, ‘2017-04-17’, ‘2017-05-01’) How do I do that?
I am learning more on SQL but this one got me confused. The instructions says:
Create and test a stored procedure called checkout_transaction that processes a “checkout” transaction. When a book is checked out, a new CHECKOUT record is inserted and the Pat_ID attribute in the BOOK table is updated to identify which patron has checked out the book. The entire transaction (starting with START TRANSACTION; and ending with COMMIT;) should be in between the BEGIN and END statements of the stored procedure. You should be able to call the procedure with a statement like this, passing the values of the Book_Num, Pat_ID, Check_Out_Date and Check_Due_Date to the procedure:
CALL checkout_transaction(5243, 1170, ‘2017-04-17’, ‘2017-05-01’)
How do I do that?
Trending now
This is a popular solution!
Step by step
Solved in 2 steps