小朱要加油 2022-04-30 18:50 采纳率: 0%
浏览 52

mysql创建表ERROR 1064 (42000): You have an error in your SQL syntax

照书上做数据清洗的实验时遇到了问题
书上的代码

img

我的代码却出现了问题

img

下面是我的代码
mysql> use test
Database changed
mysql> create table user
-> <id char<6> not null primary key,
-> name char<6> not null,
-> major char<10> not null>;
ERROR 1064 (42000): 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 char<6> not null primary key,
name char<6> not null,
major char<10> not null' at line 2
mysql>

  • 写回答

3条回答 默认 最新

  • 黑白码农 2022-04-30 19:01
    关注

    不是提示了么,id前面多了个<

    评论

报告相同问题?

问题事件

  • 创建了问题 4月30日