分隔符 $$ 和 // 有什么区别

What difference between delimiter $$ and //

通常我使用 delimiter // trigger // 来防止在分号 ; 后停止。但是还有一个使用 $$ 的分隔符,我想知道它们之间有什么区别?!什么时候,我应该使用哪一个?

没有区别。

19.1 Defining Stored Programs

You can redefine the delimiter to a string other than //, and the delimiter can consist of a single character or multiple characters. You should avoid the use of the backslash (“\”) character because that is the escape character for MySQL.