Syntax error with emulating “create user if not exists”

后端 未结 2 1127
太阳男子
太阳男子 2021-01-20 01:38

MySQL does not allow you to specify an if not exists clause in a create user statement (despite the fact that create table and c

相关标签:
2条回答
  • 2021-01-20 02:02

    MySQL supports flow control constructs within stored procedures only.

    0 讨论(0)
  • 2021-01-20 02:12

    Denis answered your precise question, but there are other ways around your problem: see my answer to mysql create user only when the user doesn't exist (where there is also an example of a similar stored procedure as well)

    0 讨论(0)
提交回复
热议问题