view: Views in MySQL have many similarities with tables. Views are also composed of several fields and several records. Views can also be used as data sources for select statements. What is saved in the view is just a select statement, which saves the view definition but not the actual data. The source data in the view all comes from the database table. The database table is called the basic table or base table, and the view is called the virtual table. 1. Create a view The syntax for creating a view is as follows. create view view name [(view field list)] as select statement example: create view t (id,name,age,sex) as select id,name,age,sex from teacher; View the view structure (view the view information, similar to viewing the table information) desc t; 2. Delete the view If a view is no longer used, you can use the drop view statement to delete the view. The syntax format is as follows. drop view view name 3. The role of view · Make operations simple · Avoid data redundancy · Enhance data security · Improve the logical independence of data The above is the introduction of views in Mysql by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Ajax jquery realizes the refresh effect of a div on the page
>>: Several common ways to deploy Tomcat projects [tested]
Table of contents Preface Achieve results Code CS...
The MySQL explain command can analyze the perform...
If you want to insert 5 records into table1, the ...
This article example shares the specific code of ...
The problem is as follows: I entered the command ...
Table of contents Preface interface type Appendix...
Table of contents introduce Implementation steps ...
MySQL 8.0.18 stable version (GA) was officially r...
Table of contents Requirement: Query ongoing acti...
Table of contents Basic instructions and usage An...
1. What is CSS Animations is a proposed module fo...
After I found that the previous article solved th...
By chance, I discovered that a SQL statement prod...
Use vue to simply implement a click flip effect f...
<br /> CSS syntax for table borders The spec...