一个不愿透露姓名的糕 2018-03-11 11:26 采纳率: 57.1%
浏览 3494
已采纳

mysql建表语句的问题 报错 error 1064 syntax

[SQL]create table 'product_info' (
'product_id' varchar(32) not null,
'product_name' varchar(64) not null comment '商品名称',
'product_price' decimal(8,2) not null comment '单价',
'product_stock' int not null comment '库存',
'product_description' varchar(512) comment '描述',
'product_icon' varchar(512) comment '小图',
'category_type' int not null comment '类目编号',
'create_time' timestamp not null default current_timestamp comment '创建时间',
'update_time' timestamp not null default current_timestamp on update current_timestamp comment '修改时间',

) comment '商品表';
[Err] 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 ''product_info' (
'product_id' varchar(32) not null,
'product' at line 1

        请问这个哪里出问题了
  • 写回答

4条回答 默认 最新

  • Ritasi 2018-03-11 11:40
    关注

    create table product_info (
    product_id varchar(32) not null,
    product_name varchar(64) not null comment '商品名称',
    product_price decimal(8,2) not null comment '单价',
    product_stock int not null comment '库存',
    product_description varchar(512) comment '描述',
    product_icon varchar(512) comment '小图',
    category_type int not null comment '类目编号',
    create_time timestamp not null default current_timestamp comment '创建时间',
    update_time timestamp not null default current_timestamp on update current_timestamp comment '修改时间',
    PRIMARY KEY (product_id)
    ) comment '商品表';

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 maixpy训练模型,模型训练好了以后,开发板通电会报错,不知道是什么问题
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 有没有帮写代码做实验仿真的
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥30 vmware exsi重置后登不上
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容