DROP VIEW if EXISTS v_student; #删除视图
CREATE or replace VIEW v_student as SELECT count(*),username from student GROUP BY username; #创建修改视图
SHOW CREATE VIEW v_student ; #查看视图创建语句
SELECT * from v_student; #使用视图
update v_student set username='ls12' where pwd='123'; #修改视图名称
网友评论