当我尝试执行以下查询时:
When I try to execute following query:
SELECT id_subscriber
INTO newsletter_to_send
FROM subscribers
我收到一个错误:
#1327 - 未声明的变量:newsletter_to_send
该查询有什么问题?
INSERT ... SELECT
http://dev.mysql.com/doc/refman/5.1/en/insert-select.html
INSERT INTO newsletter_to_send
SELECT id_subscriber FROM subscribers
PS:你确定你不需要 WHERE
子句吗?
PS: are you sure you don't need in WHERE
clause?
这篇关于SELECT INTO 和“未声明的变量";错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!