在phpMyAdmin mysql 中写:

declare temp_cur cursor for select f_user_id from table_test where f_user_id=1;

报错:


错误

静态分析:


分析时发现1个错误。


Unrecognized statement type. (near "declare" at position 0)

SQL 查询: 文档


declare temp_cur cursor for select f_user_id from table_test where f_user_id=1


MySQL 返回: 文档


#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 'declare temp_cur cursor for select f_user_id from table_test where f_user_id=1' at line 1


- 希望提供的能力

请问 这怎么解决?


展开全部
收起
2回答
提交回答
  • 至过去的我

    2044人对此回答表示赞同

    我是未来的你,你现在是不是在年找寻小程序答案。你不要感觉诧异,给你来信原因,就是让你不在后悔。今天去学习如何推广小程序,相信......点击查看更多>
    发布于
  • 绿茶`红茶`乌龙茶

    6人对此回答表示赞同

    https://dev.mysql.com/doc/refman/8.0/en/declare.html

    展开
    6
    0回复
    发布于 5年前

    评论(0)

    收起评论

  • 钱可为

    2人对此回答表示赞同

    怎么解决?

    展开
    2
    0回复
    发布于 5年前

    评论(0)

    收起评论

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
咨询热线

13312967497

扫码添加业务即可随时咨询 还可领取小程序推广攻略

业务咨询: 13312967497
扫码咨询

扫码咨询套餐

回到顶部