DELIMITER $$
USE `adate`$$
DROP VIEW IF EXISTS `offlistx`$$
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `offlistx` AS
SELECT
`A`.`id` AS `id`,
B`.`post_author` AS `post_author`
FROM (`A`
JOIN `B`)
WHERE (( `A`.`id` IN `B`.`ids`)
)$$
DELIMITER ;
其中 A.id是数字型,B.ids是文本型。 例如 5 in (2,3,5,33,)
错误码: 1064
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 '`B`.`ids`)
不知道错在哪里,请各位帮帮忙,多谢
最佳答案