drop view assign_v; create view assign_v as select e.code as 番号, e.name as 名前, s.name as 教科, t.name as 講師 from subject s cross join educand e left join assign a on (s.code, e.code) = (a.s_code, a.e_code) left join teacher t on t.code = a.t_code order by e.code, s.code ;