In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Insert all (composite table insertion) is the function of inserting a query result into multiple tables at the same time. The advantage of using insert all is that multiple target tables can be inserted by reading the source table once, reducing the overhead of repeated reads.
Syntax:
INSERT [ALL] [conditional_insert_clause]
[insert_into_clause value_clause] (subquery)
Conditional_insert_clause is:
[ALL] [FIRST]
[WHEN condition THEN] [insert_into_clause value_clause]
[ELSE] [insert_into_clause value_clause]
All: regardless of priority, insert all of them as long as the conditions are met
First: consider the priority relationship. If there is data that satisfies the first when condition and the second when condition, the first then insert statement is executed and the second then does not insert the data already inserted by the first then.
The difference can also be described as that all may insert repeatedly as long as it meets the conditions, while first must first meet the conditions, then filter and do not repeat insertion.
Example:
Insert all when c1
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.