关于mysql创建表报错问题。谢谢


create table `student`(
    ->id varchar(5),
    ->name varchar(10),
    ->age int,
    ->gender varchar(5)
    -> )charset=utf8;

提示报错
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 '-

id varchar(5),
->name varchar(10),
->age int,
->gender varchar(' at line 2
求 帮看一下到底我的问题出在哪里?谢谢

语句没问题,退出重新登录执行一遍。

img

欢迎采纳

img


create table student(

id varchar(5),

name varchar(10),

age int,

gender varchar(5)

 )charset=utf8;

这些 -> 是干嘛的....

charset=utf8