数据导入
首先登陆MySQL,
导入准备好的文件 mysql> source D:\chapters.sql;
注意输入文件路径时,不能出现中文!!!
mysql> show tables;
查看数据库中的表;
j_course 课程表
j_score 成绩表
j_student 学生表
j_teacher 老师表
输入
mysql> select * from j_teacher;
查询老师表中的所有信息
select * from 表名; 查询表的全部信息。
mysql> desc j_course;
查看表的结构
desc 表名 查询的是表的结构,和select *from 表名,查询表的数据有所不同。