In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Mysql in how to achieve view operation, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.
The operation of 1.MySQL view is only supported in the new version, and the advantage of view operation is that it can simplify the query of the database, especially for some frequently queried data tables, we can first create a view, and then when we want to query this type of data table, we can query the view directly. This can also improve the efficiency of query.
Another advantage of the view is that if you change the field or value of the base data table, the view chart will also change, so we don't have to worry about the data out of sync when changing the field value of the base data.
For example: create a view, and then query through the view.
Create view v3 as SELECT b.sid, b.grade, c.cname
FROM grade b, course c
WHERE b.cid = c.cid
Then the query queries out a piece of data from the view
Select sid,grade,cname from v3 where sid=200410001
Is it better to understand that you should not use a federated query to query a piece of data again?
2 stored procedure, this operation can make the database operation more concise, the reusability of data operation can also be better reflected, the stored procedure can realize multi-table operation, and he allows to pass in parameters. You can refer to the manual for specific operation.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.