MySQL笔记
以下查询参考三张表:
student(sno,sname,ssex,sage,sdept)
course(cno,cname,hours)
sc(sno,cno,grade)
1.创建数据库和表
create database test_db;
use test_db;
create table student
(
sno int(11) primary key,
sname varchar(25),
ssex varchar(10),
sage int(4),
sdept varchar(10)
);
2.简单查询
1.查询学生表和选课表中的全部数据
select * from student;
select *</