Using ch10_abc_markets database, write the SQL code to represent each one of the
ID: 3667764 • Letter: U
Question
Using ch10_abc_markets database, write the SQL code to represent each one of the following transactions. Use BEGIN TRANSACTION and COMMIT to group the SQL statements in logical transactions. On May 11, 2012, customer '10010' makes a credit purchase (30 days) of one unit of product '11QER/31' with a unit price of $110.00; the tax rate is 8 percent. The invoice number is 10010, and this invoice has only one product line. Create an insert statement to insert the following values into the invoice table: 1009, '10010', '11-May-2012', 118.80, 'CASH', 'OPEN' Create an insert statement to insert the following values into the line table: 1009,1, '11QER/31', 1,110.00Explanation / Answer
begin transaction
INSERT INTO INVOICE (INV_NUMBE, CUS_CODE, INV_DATE, INV_TOTAL, INV_TERMS, INV_STATUS)
VALUES (1009,'10010','11-May-2012',118.80,'CASH','OPEN')
INSERT INTO LINE (INV_NUMBE, LINE_NUMBER, P_CODE, LINE_UNITS, LINE_PRICE)
VALUES (1009,1,'11QER/31',1,110.00)
commit transaction
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.