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

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 Matlab问题解答有两个问题
  • ¥50 Oracle Kubernetes服务器集群主节点无法访问,工作节点可以访问
  • ¥15 LCD12864中文显示
  • ¥15 在使用CH341SER.EXE时不小心把所有驱动文件删除了怎么解决
  • ¥15 gsoap生成onvif框架
  • ¥15 有关sql server business intellige安装,包括SSDT、SSMS。
  • ¥15 stm32的can接口不能收发数据
  • ¥15 目标检测算法移植到arm开发板
  • ¥15 利用JD51设计温度报警系统
  • ¥15 快手联盟怎么快速的跑出建立模型