MySQL语法模板 SQL语句:视图

作者: 我是曾经那个少年 | 来源:发表于2018-12-05 15:11 被阅读0次
    1. 创建视图
    
    CREATE [OR REPLACE] [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]
        VIEW view_name [(column_list)]
        AS select_statement
        [WITH [CASCADED | LOCAL] CHECK OPTION]
    
    1. 修改视图
    ALTER
        [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]
        [DEFINER = { user | CURRENT_USER }]
        [SQL SECURITY { DEFINER | INVOKER }]
        VIEW view_name [(column_list)]
        AS select_statement
        [WITH [CASCADED | LOCAL] CHECK OPTION]
    
    1. 删除视图
    DROP VIEW [IF EXISTS]
        view_name [, view_name] ...
        [RESTRICT | CASCADE]
    

    相关文章

      网友评论

        本文标题:MySQL语法模板 SQL语句:视图

        本文链接:https://www.haomeiwen.com/subject/gyfwcqtx.html