MySQL 插入多条记录

insert into intl_fare_recommend (ifr_id,ifr_gmt_created,ifr_gmt_modified,ifr_dep,ifr_arr,ifr_airline,ifr_route_type,ifr_amount,ifr_status) select null,now(),now(),departure_airport,arrival_airport,airline_code,route_type,count(*),0 from intl_fare_record where status=1 and print_ticket_expire_date>=current_date() and print_ticket_start_date<=current_date() group by departure_airport,arrival_airport,airline_code,route_type;

你可能感兴趣的:(mysql)