Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Complete and print the following SQL transactions. Log your statements and resul

ID: 3708003 • Letter: C

Question

Complete and print the following SQL transactions. Log your statements and results by spooling your file (with echo on from Oracle if available).

Add a new customer to the Customer table. The customer ID should be one more than the max customer ID in the customer table. Hint: Use a nested SELECT and the MAX function. CustFName            CustLName     ___CustPh__ ___      CustType

      Susan               White                    214-555-2020        C

ResDetail Customer CustlD CustFName CustLName CustPhone CustType LoyaltylD Reservation ResID CheckinDate CheckOutDate CustID AgentID ReslD Room CustType CustType CustTypeDesc RoomNum RateType RateAmt RoomType Agent AgentlD AgentFName AgentLName AgentType RateType RateType RateTypeDesc RoomType RoomType RoomTypeDesc AgentType AgentType AgentTypeDesc

Explanation / Answer

UPDATE Customer

SET CustPhone = ‘214-555-2020   ’

WHERE CustID =C;

INSERT INTO Customer (CustID, CustFName, CustLName) VALUES (120, ‘Amanda’, ‘Green’)

// Updating values reservation table

UPDATE TABLE Reservation

SET CheckOutDate = ‘2/8/2018’

WHERE ResID = 1001;

// Adding a row in Reservation table

INSERT INTO Reservation VALUES (1011, ‘3/1/2018’, ‘3/4/3018’, 120, 14);

COMMIT;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote