创建视图: 假设要将posts表的前十条数据作为视图
mysql> CREATE VIEW view_test AS SELECT * FROM POSTS LIMIT 10;
使用: 可以把视图当成普通的表来使用
mysql> SELECT * FROM view_test;