问答详情
源自:4-1 数据库设计与编码

报这个错误,哪里错了啊

http://img.mukewang.com/58f5ce9600017e4f06410232.jpg这是源码

CREATE TABLE seckill (

 `seckill_id` BIGINT NOT NULL AUTO_INCREMENT COMMENT '商品库存ID',

 `name` VARCHAR (120) NOT NULL COMMENT '商品名称',

 `number` INT NOT NULL COMMENT '库存数量',

 `create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',

 `start_time` TIMESTAMP NOT NULL COMMENT '秒杀开启时间',

 `end_time` TIMESTAMP NOT NULL COMMENT '秒杀结束时间',

 PRIMARY KEY (seckill_id),

 KEY idx_start_time (start_time),

 KEY idx_end_time (end_time),

 KEY idx_create_time (create_time)

) ENGINE = INNODB AUTO_INCREMENT = 1000 DEFAULT CHARSET = utf8 COMMENT = '秒杀库存表' ;

--初始化数据

insert into

   seckill (name , number , start_time , end_time)

VALUES

   ('100元秒杀ipad' , 100 , '2017-04-19 00:00:00' , '2017-04-20 00:00:00'),

   ('200元秒杀小米5' , 100 , '2017-04-19 00:00:00' , '2017-04-20 00:00:00'),

   ('300元秒杀iphone6s' , 100 , '2017-04-19 00:00:00' , '2017-04-20 00:00:00');

求大神

提问者:慕勒4506555 2017-04-18 16:30

个回答

  • Bruce_Vae
    2017-04-18 23:22:06

    数据库url有没有characterEncoding。。。等参数