MySQL视图详解
视图
试图概述
创建视图和修改视图
例子
select c.,t.country_name from city c,country t where c.country_id = t.country_id;
create view view_country_city as select c.,t.country_name from city c,country t where c.country_id = t.country_id;
怎么操作表就怎么操作视图
视图作为简化我们查询的方法,不建议对视图进行更新,(视图可以更新)
- 查看视图
show tables; - 查看建立视图时候的语句
show create view viewName;
删除视图