如何在MySQL中创建视图?

时间:2011-03-03 20:07:18

标签: mysql view

如何在MySQL中创建视图?

2 个答案:

答案 0 :(得分:54)

http://dev.mysql.com/doc/refman/5.5/en/create-view.html

示例:

Create View `MyViewName` as 
    Select
        col1, col2, col3
    From
        myTable T

答案 1 :(得分:7)

CREATE VIEW v AS SELECT * FROM t;