I have classroom schedule in an SQL database.
INSERT INTO schedule (date)
VALUES
('2016-05-16 13:00:00'),
('2016-05-16 14:00:00'),
('2016-05-16 15:00:00'),
('2016-05-16 16:00:00'),
('2016-05-16 17:00:00'),
('2016-05-17 13:00:00'),
('2016-05-17 14:00:00'),
('2016-05-17 15:00:00'),
('2016-05-17 16:00:00'),
('2016-05-17 17:00:00'),
('2016-05-18 13:00:00'),
('2016-05-18 14:00:00'),
('2016-05-18 15:00:00'),
('2016-05-18 16:00:00'),
('2016-05-18 17:00:00'),
('2016-05-19 13:00:00'),
('2016-05-19 14:00:00'),
('2016-05-19 15:00:00'),
('2016-05-19 16:00:00'),
('2016-05-19 17:00:00');
After I've created the dates in the variable 'date'. I want to insert the accompanying place into another variable called 'place' where to go at that specific time. Something like this
INSERT INTO schedule (place)
VALUES
('Room A'),
('Room A'),
('Room A'),
('Room A'),
('Room A'),
('Room A'),
('Room A'),
('Room A'),
('Room A'),
('Room A'),
('Room A'),
('Room A'),
('Room A'),
('Room A'),
('Room A'),
('Room A'),
('Room A'),
('Room A'),
('Room A'),
('Room A');
But then I need to make sure that the entries match such that the third entry in 'date' matches the third entry in 'place'. I'm looking for solutions. And if you have an even better all over solution than in this example please let me know :)
INSERT
andUPDATE
commands?