视图
-- 创建
CREATE VIEW type2 AS SELECT
*
FROM
`area`
WHERE
`area_type` = '2';
-- 展示创建语句
SHOW CREATE VIEW type2;
-- 删除
DROP VIEW type2;
-- 创建或替换
CREATE OR REPLACE VIEW type2 AS SELECT
*
FROM
`area`
WHERE
`area_type` = '1';
-- 查询
SELECT * FROM type2;