1

我正在尝试“修复”此查询:

INSERT INTO tblmypagepop (DID,MyPageName,GID) 
VALUES(77568,(SELECT PGID FROM `tblpageindex77568` 
WHERE PageName like "%new_vehicle_list%"),4741)

该查询仅在子查询时有效:

(SELECT PGID FROM `tblpageindex77568` WHERE PageName like "%new_vehicle_list%") 

只有一个值,当我有多个时不买。我已经检查了其他有类似问题的帖子,他们查询的购买方式不同,如下所示:

SELECT * FROM t1 WHERE column1 = (SELECT column1 FROM t2);

有什么想法吗?

4

1 回答 1

2
INSERT INTO tblmypagepop (DID,MyPageName,GID)
(SELECT 77568, PGID, 4741 FROM `tblpageindex77568`
  WHERE PageName like "%new_vehicle_list%")

试试看。

于 2012-10-18T23:04:43.743 回答