用mysql如何创建这样的表格

img

这是前端的事情,和mysql没关系,后端将数据查询出来给前端,前端编写table表格进行展示出来数据

SQL CREATE TABLE 语句 | 菜鸟教程

先用create语句,在用insert语句插入数据

用一些可视化的软件,这样比较好创建表格,如果你是初学者的化,建议用cmd模式,手写 sql语句来了练习一下!

首先创建表格 ----
create table course( c_id tinyint primary key ,c_name varchar(12) ,c_score tinyint);
create table score (sc_stuid int primary key ,sc_ id tinyint ,sc_score double , constraint scs_id foreign key (sc_id) references course ( c_id));
create table student (Stu_id int primary key ,Stu_name varchar(8) ,Stu_age tinyint ,Stu_sex enum('男' ,'女') ,Stu_college varchar(12) ,constraint u_id foreign key (sc_stuid) references student(Stu_id));

就这样吧,其他靠你自己了,
欢迎采纳!!