Can't use column name “desc” in mysql

后端 未结 3 470
滥情空心
滥情空心 2020-12-07 02:27
INSERT INTO movie (id, title, desc, released, views, featured) VALUES (\'\', \'title\', \'
\\r\\n    description
\\r\\n\', \'2006-12-12\', \'0\', \'0\')
3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-07 02:30

    desc is a mysql reserved word. you must use backticks `` with the columns which are reserved words.

    INSERT INTO movie (id, title, `desc`, released, views, featured)...
    

    You should avoid using reserved words as column name or must use backticks (``)

提交回复
热议问题