SELECT INTO and “Undeclared variable” error

前端 未结 10 2235
你的背包
你的背包 2020-11-30 06:58

When I try to execute following query:

SELECT id_subscriber
  INTO newsletter_to_send
  FROM subscribers 

I get an error:

10条回答
  •  北荒
    北荒 (楼主)
    2020-11-30 07:49

    MySQL does not support the SELECT ... INTO ... syntax.

    You have to use the INSERT INTO ... SELECT .. syntax to accomplish there.

    Read more here.. http://dev.mysql.com/doc/refman/5.0/en/insert-select.html

提交回复
热议问题