10-221 检索所有女同学的基本信息。
select *
from student
where sex = '女'
10-222 找出所有姓“李”的学生姓名、民族和联系电话。
select sname,nation,phone
from student
where sname like '李%';
10-223 检索出所有成绩为空的学号,课号。
select sno,cno
from score
where grade is null
10-224 检索出所有课程性质为“必修”的课程号、课程名和学分。
select cno as 课程号,cname as 课程名,credit as 学分
from course
where attribute='必修';
10-225 检索所有选修了40008课的学生学号和成绩,查询结果按学号升序排列。
select sno as 学号, grade as 成绩
from score
where cno = 40008
order by 学号 asc;
10-226 查询所有1997出生的学生的学号、姓名、民族和身份证号码。
select s