Yes, it causes issues if you use it directly like
DESCRIBE my-table;
This will definately cause issues. You will get the following error:
ERROR 1064 (42000): 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 '-table' at line 1
We can resolve this issue enclosing the tablename in backticks (`). The identifier quote character is the backtick (“
DESCRIBE `my-table`;
For more details about the permitted characters in unquoted identifiers, check the MySQL identifiers HERE.
DESCRIBE my-table;
This will definately cause issues. You will get the following error:
ERROR 1064 (42000): 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 '-table' at line 1
We can resolve this issue enclosing the tablename in backticks (`). The identifier quote character is the backtick (“
`
”). So the syntax will beDESCRIBE `my-table`;
For more details about the permitted characters in unquoted identifiers, check the MySQL identifiers HERE.
No comments:
Post a Comment