create TABLE `t_diner_points`
( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '数据表主键',
`fk_diner_id` int(11) null default null COMMENT '用户id',
`points` int(11) null default null COMMENT '积分',
`types` int(11) null default null COMMENT '种类,0=签到,1=关注好友,2=添加评论 3=点赞商户',
`is_valid` int(11) null default null COMMENT '是否有效',
`create_date` datetime null default null COMMENT '添加日期',
`update_date` datetime null default null COMMENT '更新日期',
primary key (`id` )
) engine = InnoDB
DEFAULT CHARACTER SET = UTF8mb4
COLLATE = utf8mb4_general_ci
AUTO_INCREMENT = 1
ROW_FORMAT = COMPACT
;
[2021-07-26 12:00:18] [42000][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 ''t_diner_points'
[2021-07-26 12:00:18] (
[2021-07-26 12:00:18] 'id' int(11) NOT NULL AUTO_INCREMENT COMMENT' at line 1
问题一:总是创建不成功,就是那个分号的问题。用上面的分号
问题:去掉某一列的空格
UPDATE chengyu SET name=TRIM(name);