drop view teacher_v; create view teacher_v as select t.code as 番号, t.name as 名前, s.name as 教科, (select count(*) from assign where t.code = t_code) as 受講人数 from teacher t join subject s on t.s_code = s.code order by t.code ;