Home  >  Article  >  Database  >  How to modify mysql view

How to modify mysql view

coldplay.xixi
coldplay.xixiOriginal
2020-10-16 09:20:383977browse

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....].

How to modify mysql view

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;

How to modify mysql view

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn