Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write the sql code for Create a separate table with the same structure as the Reservations table to hold archive records. Using INSERT statement, copy

image text in transcribed

Write the sql code for Create a separate table with the same structure as the Reservations table to hold archive records. Using INSERT statement, copy the records of all past bookings (that ended before today) from the Reservation table to the archive table. Then delete all archived bookings from the Reservation table. Note: You can recover the original data by reimporting the sel data file. vo test reservation RES_ID: int(11) # GUEST_ID: int(11) a RES_CHECKIN: date a RES_CHECKOUT : date RES_BOOKING_TIME: datetime vo test room_booking RES_ID: int(11) RM_ID: int(11) # RMBK_NUM_ADULTS: int(11) # RMBK_NUM_CHILD : int(11) # RMBK_DAILY_RATE: int(11) Vo test room RM_ID : int(11) # HTL_ID : int(11) RM_TYPE: varchar(50) # RM_NUMBER : int(11) # RM NUM BEDS int(11) # RM_DAILY RATE : int(11) V test guest GUEST_ID : int(11) GUEST_FNAME : varchar(50) GUEST_LNAME : varchar(50) GUEST_EMAIL : varchar(50) GUEST_PHONE: varchar(50) @GUEST_ST_ADDRESS: varchar(50) GUEST_SUBURB : varchar(50) GUEST_STATE: varchar(50) GUEST_COUNTRY : varchar(50) Vo t est hotel HTL ID : int(11) @ HTL_NAME : varchar(50) @ HTL_SUBURB : varchar(50) @ HTL_CITY: varchar(50) @ HTL_COUNTRY : varchar(50) # HTL_STAR_RATING: int(11)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learning MySQL Get A Handle On Your Data

Authors: Seyed M M Tahaghoghi

1st Edition

0596529465, 9780596529468

More Books

Students also viewed these Databases questions