新建
上传
首页
助手
最?/div>
资料?/div>
工具

sqlServer2005

习题与答?/p>

 

 

 

 

 

 

从学生表

Student(Sno,Sname,Ssex,Sage,Sdept)

中查

询出全体学生的学号与姓名

 

1. 

 

 

 

 

 

查询全体学生的详细记?/p>

 

2. 

 

 

 

 

 

显示?/p>

 

5

条纪?/p>

 

3. 

 

 

 

 

 

显示?/p>

 

50%

条纪?/p>

 

4. 

 

 

 

 

 

查询所有年龄在

17

岁以下的学生姓名及其年龄?/p>

 

5. 

 

 

 

 

 

某些学生选修课程后没有参加考试

,

所以有选课?/p>

?/p>

,

但没有考试成绩?/p>

查询缺少成绩的学生的学号和相应的?/p>

程号?/p>

(成绩为

null

?/p>

 

6. 

 

 

 

 

 

查所有有成绩的学生学号和课程?/p>

 

7. 

 

 

 

 

 

查询学生的所有信息,按学号的降序排列

 

 

 

 

 

 

 

 

 

 

1.select * 

 

from student 

 

 

 

 

 

 

 

 

 

2.select top 5 * 

 

from student 

 

 

 

 

 

 

 

 

 

 

3.select top 50 percent * 

 

 

 

from student 

 

 

 

 

 

 

 

 

 

 

4.select sname,sage 

 

from student 

 

where 

sage<17 

 

 

 

 

 

 

 

 

 

5.select sno,cno 

 

from sc 

 

where score is 

NULL 

 

 

 

 

 

 

 

 

 

6.select sno,cno 

 

from sc 

 

where score is not 

NULL 

Ͼλ
新建
上传
首页
助手
最?/div>
资料?/div>
工具

sqlServer2005

习题与答?/p>

 

 

 

 

 

 

从学生表

Student(Sno,Sname,Ssex,Sage,Sdept)

中查

询出全体学生的学号与姓名

 

1. 

 

 

 

 

 

查询全体学生的详细记?/p>

 

2. 

 

 

 

 

 

显示?/p>

 

5

条纪?/p>

 

3. 

 

 

 

 

 

显示?/p>

 

50%

条纪?/p>

 

4. 

 

 

 

 

 

查询所有年龄在

17

岁以下的学生姓名及其年龄?/p>

 

5. 

 

 

 

 

 

某些学生选修课程后没有参加考试

,

所以有选课?/p>

?/p>

,

但没有考试成绩?/p>

查询缺少成绩的学生的学号和相应的?/p>

程号?/p>

(成绩为

null

?/p>

 

6. 

 

 

 

 

 

查所有有成绩的学生学号和课程?/p>

 

7. 

 

 

 

 

 

查询学生的所有信息,按学号的降序排列

 

 

 

 

 

 

 

 

 

 

1.select * 

 

from student 

 

 

 

 

 

 

 

 

 

2.select top 5 * 

 

from student 

 

 

 

 

 

 

 

 

 

 

3.select top 50 percent * 

 

 

 

from student 

 

 

 

 

 

 

 

 

 

 

4.select sname,sage 

 

from student 

 

where 

sage<17 

 

 

 

 

 

 

 

 

 

5.select sno,cno 

 

from sc 

 

where score is 

NULL 

 

 

 

 

 

 

 

 

 

6.select sno,cno 

 

from sc 

 

where score is not 

NULL 

">
新建
上传
首页
助手
最?/div>
资料?/div>
工具

sqlServer2005

习题与答?/p>

 

 

 

 

 

 

从学生表

Student(Sno,Sname,Ssex,Sage,Sdept)

中查

询出全体学生的学号与姓名

 

1. 

 

 

 

 

 

查询全体学生的详细记?/p>

 

2. 

 

 

 

 

 

显示?/p>

 

5

条纪?/p>

 

3. 

 

 

 

 

 

显示?/p>

 

50%

条纪?/p>

 

4. 

 

 

 

 

 

查询所有年龄在

17

岁以下的学生姓名及其年龄?/p>

 

5. 

 

 

 

 

 

某些学生选修课程后没有参加考试

,

所以有选课?/p>

?/p>

,

但没有考试成绩?/p>

查询缺少成绩的学生的学号和相应的?/p>

程号?/p>

(成绩为

null

?/p>

 

6. 

 

 

 

 

 

查所有有成绩的学生学号和课程?/p>

 

7. 

 

 

 

 

 

查询学生的所有信息,按学号的降序排列

 

 

 

 

 

 

 

 

 

 

1.select * 

 

from student 

 

 

 

 

 

 

 

 

 

2.select top 5 * 

 

from student 

 

 

 

 

 

 

 

 

 

 

3.select top 50 percent * 

 

 

 

from student 

 

 

 

 

 

 

 

 

 

 

4.select sname,sage 

 

from student 

 

where 

sage<17 

 

 

 

 

 

 

 

 

 

5.select sno,cno 

 

from sc 

 

where score is 

NULL 

 

 

 

 

 

 

 

 

 

6.select sno,cno 

 

from sc 

 

where score is not 

NULL 

Ͼλ">
Ͼλ
Ŀ

sqlServer2005习题与答?- 百度文库
新建
上传
首页
助手
最?/div>
资料?/div>
工具

sqlServer2005

习题与答?/p>

 

 

 

 

 

 

从学生表

Student(Sno,Sname,Ssex,Sage,Sdept)

中查

询出全体学生的学号与姓名

 

1. 

 

 

 

 

 

查询全体学生的详细记?/p>

 

2. 

 

 

 

 

 

显示?/p>

 

5

条纪?/p>

 

3. 

 

 

 

 

 

显示?/p>

 

50%

条纪?/p>

 

4. 

 

 

 

 

 

查询所有年龄在

17

岁以下的学生姓名及其年龄?/p>

 

5. 

 

 

 

 

 

某些学生选修课程后没有参加考试

,

所以有选课?/p>

?/p>

,

但没有考试成绩?/p>

查询缺少成绩的学生的学号和相应的?/p>

程号?/p>

(成绩为

null

?/p>

 

6. 

 

 

 

 

 

查所有有成绩的学生学号和课程?/p>

 

7. 

 

 

 

 

 

查询学生的所有信息,按学号的降序排列

 

 

 

 

 

 

 

 

 

 

1.select * 

 

from student 

 

 

 

 

 

 

 

 

 

2.select top 5 * 

 

from student 

 

 

 

 

 

 

 

 

 

 

3.select top 50 percent * 

 

 

 

from student 

 

 

 

 

 

 

 

 

 

 

4.select sname,sage 

 

from student 

 

where 

sage<17 

 

 

 

 

 

 

 

 

 

5.select sno,cno 

 

from sc 

 

where score is 

NULL 

 

 

 

 

 

 

 

 

 

6.select sno,cno 

 

from sc 

 

where score is not 

NULL 



ļ׺.doc޸Ϊ.docĶ

  • ͳԡרϰ
  • ڲѧϰʦ
  • 2019߿ѧһָϰ 10 ԭ 9 ɢľֵ
  • ϴƶȻ
  • ɽв(³)滮
  • ͳ߿Ķרϰ()Ʒ
  • ʵ񣺽üְ
  • 4x4cԳ
  • װػ(ZL30-ZL40-ZL50)
  • жﵽ

վ

԰ Ͼλ
ϵͷ779662525#qq.com(#滻Ϊ@)