Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The characteristics and specific usage of mysql View view

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces "the characteristics and specific usage of mysql view view". In daily operation, I believe that many people have doubts about the characteristics and specific usage of mysql view view. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts about "the characteristics and specific usage of mysql view view". Next, please follow the editor to study!

View is a feature pushed after the Mysql5.1 version, which is a virtual watch itself. Its data comes from the actual watch. Dynamic data can be obtained by executing SQL statements, and the result set can be obtained by using the name directly. Let's discuss the specific characteristics below.

Characteristics

1. Improve the reusability of SQL.

2. Protect basic table data and improve security (view virtual tables are often exposed when docking third-party data).

3. it is easy to use and can be directly used as a virtual table.

Example

-- user table CREATE TABLE `user` (`id` bigint (20) NOT NULL COMMENT 'key ID', `name` varchar (30) DEFAULT NULL COMMENT' name', `age`int (11) DEFAULT NULL COMMENT 'age', `email`varchar (50) DEFAULT NULL COMMENT 'mailbox', PRIMARY KEY (`id`), KEY `index_ age` (`age`) ENGINE=InnoDB DEFAULT CHARSET=utf8;-add data INSERT INTO `test`.user` (`id`, `name`, `age`, `email`) VALUES (1, 'Jone', 1,' test1@baomidou.com') INSERT INTO `test`.`user` (`id`, `name`, `age`, `email`) VALUES (2, 'Jack', 20,' test2@baomidou.com'); INSERT INTO `test`.user` (`id`, `name`, `age`, `email`) VALUES (3, 'Tom', 28,' test3@baomidou.com'); INSERT INTO `test`.user` (`id`, `name`, `age`, `email`) VALUES (4, 'Sandy', 21,' test4@baomidou.com') At this point, the study on "the characteristics and specific use of mysql view view" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report