In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
MySQL View of Python full Stack Road Series
View is a virtual table (not real), its essence is to get dynamic data set according to SQL statement and name it. Users only need to use the name to get the result set, and can use it as a table.
Create a view
Create a view named v1 whose function is to query all the data in the color table
CREATE VIEW v1 AS SELECT * FROM color
View view
When using the view, it can be operated as a table. Because the view is a virtual table, it can not be used to create, update and delete the real table, but can only be used for query.
Select * from v1;-- equal to execute SELECT * FROM color
Output result
+-+-+ | nid | title | +-+-+ | 1 | red | | 2 | yellow | +-+-+ 2 rows in set (0.00 sec)
Modify the view
ALTER VIEW v1 AS SELECT * FROM color WHERE nid = 1
Delete View
DROP VIEW v1
# Python full Stack Road
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.