原創:轉載需註明原創地址 https://www.cnblogs.com/fanerwei222/p/11776598.html
Mysql視圖使用方法:html
建立一個名稱爲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;