Can we have the table name as “option” in MySQL?

后端 未结 8 1211
挽巷
挽巷 2020-12-19 01:41

I am very, very new to MYSQL.I tried to create a table named \"option\". My SQL Query is :

create table option(

id int not

8条回答
  •  别那么骄傲
    2020-12-19 01:48

    You can use SQL keywords as table names in MySQL if you escape them with back-quotes.

     CREATE TABLE `option` (
         ...
     )
    

    It's not normally a good idea to do so, though.

提交回复
热议问题