How to modify mysql view

coldplay.xixi
Release: 2020-10-19 11:00:30
Original
3927 people have browsed it

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 语句。
Copy after login
create or replace view algorith=temptable view student_view(nid,id,name) as select id,pid,title from student;
Copy after login

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;
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!