亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

insert報錯1366

588495cd0001739905000411.jpg

588495ce0001be0c05000328.jpg

seckill 也一直報錯說只能有一個timestamp我把創建時間放到開啟時間的前面就沒事了


但是下面的insert語句報錯 ?又是什么原因 ?好郁悶的啊


不正確的字符串值:“\ xC3 \ xEB \ xC9 \ xB1ip…“列”的名字在第一行


正在回答

2 回答

我是用cmd也會出現這種錯誤,應該是編碼格式的問題,之后我用navicat插入數據就可以了!你試試

1 回復 有任何疑惑可以回復我~

我用的mysql workbench沒出現你那個問題啊


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;


0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

insert報錯1366

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號