0

enter image description here

reason:Error Code: 1064. 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 'почта VARCHAR(50), тип травмы ENUM('физическая', 'э' at line 9

where did I go wrong?

1

1 Answer 1

1

Column name тип травмы has a blank (space) in it. That is not allowed. The most common solution is to replace the space by an underscore, like this:

тип_травмы

Another option is to use a quoted identifier:

"тип травмы"

but that makes your code more complicated as it requires each reference to the column to also use quotes. Using underscores is IMO a much simpler solution.

2
  • 2
    In MySQL this needs in ANSI_QUOTES server SQL mode. Otherwise the value will be treated as string literal which is a syntax error too.
    – Akina
    Commented Jul 2 at 8:00
  • Or use backtics (`) around identificers.
    – Rick James
    Commented Jul 7 at 14:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.