CREATE TEMPORARY TABLE IF NOT EXISTS temp27
(temp2_id integer not null auto_increment primary key,
temp2_court_id integer,
temp2_sport_id integer,
temp2_date datetime,
temp2_weekday varchar(255),
temp2_slot_start_time datetime,
temp2_slot_end_time datetime,
temp2_rank integer);
insert into temp27(temp2_court_id,temp2_sport_id,temp2_date,temp2_weekday,temp2_slot_start_time,temp2_rank)
select @court_id,@sport_id,@date1,@weekday1,get_slot_time.slot_time_intervals,(@curRank := @curRank + 1) from get_slot_time,(SELECT @curRank := 1) r;
update temp27,get_slot_time
set temp27.temp2_slot_end_time=get_slot_time.slot_time_intervals
where temp27.temp2_rank=get_slot_time.get_slot_time_id;
insert into temp3(temp3_court_id,temp3_sport_id,temp3_date,temp3_weekday,temp3_start_time,temp3_end_time)
select a.temp2_court_id,a.temp2_sport_id,a.temp2_date,a.temp2_weekday,a.temp2_slot_start_time,
a.temp2_slot_end_time from temp27 a;
错误消息是:
mysql error 1054 unknown column temp27.temp2_slot_start_time