Delimiters in MySQL

后端 未结 4 630
有刺的猬
有刺的猬 2020-11-22 01:24

I often see people are using Delimiters. I tried myself to find out what are delimiters and what is their purpose. After 20 minutes of googling, I was not able to find an an

4条回答
  •  隐瞒了意图╮
    2020-11-22 01:44

    The DELIMITER statement changes the standard delimiter which is semicolon ( ;) to another. The delimiter is changed from the semicolon( ;) to double-slashes //.

    Why do we have to change the delimiter?

    Because we want to pass the stored procedure, custom functions etc. to the server as a whole rather than letting mysql tool to interpret each statement at a time.

提交回复
热议问题