视图
视图
- 对于复杂的查询,在多次使用后,维护是一件非常麻烦的事情
- 解决:定义视图
- 视图本质就是对查询的一个封装
- 定义视图
create view stuscore as
select students.*,scores.score from scores
inner join students on scores.stuid=students.id;
- 视图的用途就是查询
select * from stuscore;
posted on 2019-10-16 22:22 cherry_ning 阅读(74) 评论(0) 收藏 举报
浙公网安备 33010602011771号