问题遇到的现象和发生背景
有A B两张表,A表的某一列是B表中的两列之和,现在要把B的两列之和插入到A中
问题相关代码,请勿粘贴截图
insert into TBL_PASSENGER_FLOW_STATISTICS(station,enter_station,leave_station)
VALUES(
select station_id from TBL_PASSENGER_FLOW ,
SELECT ifnull(QR_IN_NUM,0)+ifnull(FACE_IN_NUM,0) from TBL_PASSENGER_FLOW ,
SELECT ifnull(QR_OUT_NUM,0)+ifnull(FACE_OUT_NUM,0)from TBL_PASSENGER_FLOW
);
运行结果及报错内容 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select station_id from TBL_PASSENGER_FLOW ,
SELECT ifnull(QR_IN_NUM,0)+ifnull(F' at line 3