Create a separate table with the same structure as the Booking table to hold archive records. Using the INSERT statement, copy the records from the Booking table to the archive table relating to bookings before 1st January 2013. Delete all bookings before 1st January 2013 from the Booking table.

What will be an ideal response?

CREATE TABLE BookingOld( hotelNo CHAR(4) NOT NULL,
guestNo CHAR(4) NOT NULL,
dateFrom DATETIME NOT NULL,
dateTo DATETIME NULL,
roomNo VARCHAR(4) NOT NULL);
INSERT INTO BookingOld
(SELECT * FROM Booking
WHERE dateTo < DATE’2013-01-01’);
DELETE FROM Booking
WHERE dateTo < DATE’2013-01-01’;

Computer Science & Information Technology

You might also like to view...

Data sources being opened and read applies to:

A. Indexing Phase B. Parsing Phase C. Input Phase D. License Metering E. None of the above

Computer Science & Information Technology

A program called PowerPoint Presenter displays presentations on computers on which PowerPoint is not installed.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology