原创:转载需注明原创地址 https://www.cnblogs.com/fanerwei222/p/11776598.html
Mysql视图使用方法:
创建一个名称为view_stu_class_t 的视图 CREATE VIEW view_stu_class_t AS SELECT * FROM stu_user su LEFT JOIN class_user cu ON su.class_id = cu.cid 查看视图的定义 DESCRIBE view_stu_class_t; 修改视图 ALTER VIEW view_stu_class_t AS SELECT * FROM stu_user; 删除多个视图 DROP VIEW IF EXISTS view_stu_class_t, view_stu_class;