Mysql 创建视图view

创建视图语法:

create view view_name as
select
    column_name1,
    column_name2,
    ...
    from table_name
where
    condition;

 

更新视图语法

create or replace
view_name as
select
    cloumn_name1,
    column_name2,
    ...
    from table_name
where
    condition;

 

撤销视图语法:

drop view view_name;

 查看视图语法:

show create view tablename;

 

posted @ 2019-06-11 22:09  Avicii_2018  阅读(186)  评论(0编辑  收藏  举报