Rules for choosing a delimiter
| User, date | Message |
|---|---|
|
Written by kalvaro
3 years ago Category: Running SQL scripts 440 posts since Thu, 29 Nov 07 |
I've noticed that HeidiSQL uses // as delimiter when dumping code for stored routines. Is it a safe choice to use in my own code? I have a little PHP script that generates SQL dumps and I want to make sure the dumps are valid no matter the code. P.S. Other possibilities seem to be $$ (MySQL Workbench) and ;; (mysqldump). |
|
Written by ansgar
3 years ago 3950 posts since Fri, 07 Apr 06 |
Slash should be safe in PHP code. Back slash would be unsafe i think. |
|
Written by kalvaro
3 years ago 440 posts since Thu, 29 Nov 07 |
I was referring to the script output, not the PHP code itself. I guess I'll try double slash: it's not a valid syntax element in SQL and I suppose it doesn't count as delimiter if it's found inside a comment or a quoted string. |
|
Please login to leave a reply, or register at first. |