数据库 求答案
展开全部
2)列出教师表中教师数<20的系及教师数;
declare
@coount_Th
int
select
@coount_Th=count(0)from
teacher
select
dept,count(no)
from
teacher
where
@coount_Th<20
group
by
dept
4)创建一个视图teacher_only,列出不是班主任的教师的编号、姓名和所属系;
create
view
teacher_only
as
select
[no],[name],dept
from
teacher,class
where
[no]<>sir_no
呵呵··他没答得我帮你答下。
declare
@coount_Th
int
select
@coount_Th=count(0)from
teacher
select
dept,count(no)
from
teacher
where
@coount_Th<20
group
by
dept
4)创建一个视图teacher_only,列出不是班主任的教师的编号、姓名和所属系;
create
view
teacher_only
as
select
[no],[name],dept
from
teacher,class
where
[no]<>sir_no
呵呵··他没答得我帮你答下。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询