Home >Database >Mysql Tutorial >How to modify mysql view
Mysql method to modify the view: 1. If the view exists, overwrite it, if it does not exist, create it, the code is [create or replace view statement]; 2. Modify through the alter statement, the code is [alter view student_view (id,name....].
Mysql method to modify the view:
1 , If the view exists, it will be overwritten, if it does not exist, it will be created.
create or replace view 语句。
create or replace view algorith=temptable view student_view(nid,id,name) as select id,pid,title from student;
2. Modify through the alter statement.
alter view student_view(id,name,title) as select id,name,sex from student;
Related learning free recommendations: mysql database(Video)
The above is the detailed content of How to modify mysql view. For more information, please follow other related articles on the PHP Chinese website!