对于复杂的查询,在屡次使用后,维护是一件很是麻烦的事情ui
解决:定义视图spa
视图本质就是对查询的一个封装code
定义视图blog
create view stuscore as select students.*,scores.score from scores inner join students on scores.stuid=students.id;
视图的用途就是查询class
select * from stuscore;