当我尝试执行以下查询时:
SELECT id_subscriber INTO newsletter_to_send FROM subscribers
我收到一个错误:
#1327-未声明的变量:newsletter_to_send
该查询有什么问题?
INSERT ... SELECT
http://dev.mysql.com/doc/refman/5.1/zh-CN/insert- select.html
INSERT INTO newsletter_to_send SELECT id_subscriber FROM subscribers
PS:您确定不需要in WHERE子句吗?
WHERE