insert報(bào)錯(cuò)1366
seckill 也一直報(bào)錯(cuò)說(shuō)只能有一個(gè)timestamp我把創(chuàng)建時(shí)間放到開(kāi)啟時(shí)間的前面就沒(méi)事了
但是下面的insert語(yǔ)句報(bào)錯(cuò) ?又是什么原因 ?好郁悶的啊
不正確的字符串值:“\ xC3 \ xEB \ xC9 \ xB1ip…“列”的名字在第一行
seckill 也一直報(bào)錯(cuò)說(shuō)只能有一個(gè)timestamp我把創(chuàng)建時(shí)間放到開(kāi)啟時(shí)間的前面就沒(méi)事了
但是下面的insert語(yǔ)句報(bào)錯(cuò) ?又是什么原因 ?好郁悶的啊
不正確的字符串值:“\ xC3 \ xEB \ xC9 \ xB1ip…“列”的名字在第一行
舉報(bào)
2017-07-06
我是用cmd也會(huì)出現(xiàn)這種錯(cuò)誤,應(yīng)該是編碼格式的問(wèn)題,之后我用navicat插入數(shù)據(jù)就可以了!你試試
2017-01-30
我用的mysql workbench沒(méi)出現(xiàn)你那個(gè)問(wèn)題啊
SQL 如下
create database seckill;
use seckill;
create table seckill(
`seckill_id` bigint NOT NULL auto_increment comment 'bank save count',
`name` varchar(120) not null comment 'name',
`number` int not null comment 'asdf',
`start_time` timestamp not null comment 'time',
`end_time` timestamp not null comment '',
`create_time` timestamp not null default current_timestamp,
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;
insert into seckill(name,number,start_time,end_time)
values
('1000 iphone6', 100,'2016-11-11 00:00:00','2016-11-12 00:00:00'),
('1000 ipad2', 100,'2016-11-11 00:00:00','2016-11-12 00:00:00');
create table success_killed(
`seckill_id` bigint NOT NULL,
`user_phone` bigint not null,
`state` int not null default -1,
`create_time` timestamp not null,
primary key(seckill_id,user_phone),
key idx_create_time(create_time)
)engine=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8;
commit;