我有以下查询,但在破折号处失败:
'create table 4$0_Anzahl_der_Anforderungen_des_V-NEF_2019 (Monat INTEGER, Eigenschaft_1 FLOAT, constraint pk_1 primary key(Monat));' }
出现以下错误:
{ Error: ER_PARSE_ERROR: 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 '"4$0_Anzahl_der_Anforderungen_des_V-NEF"_2019 (Monat INTEGER, Eigenschaft_1 FLOA' at line 1
我已经尝试用-
替换\-
,但这没有帮助。如何正确更换?
答案 0 :(得分:2)
在mysql中,用于创建有效的对象名称,包括空格,保留字或特殊字符(如破折号,减号或加号)
create table `4$0_Anzahl_der_Anforderungen_des_V-NEF_2019`