In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Let's talk about how to merge two rows of mysql data into one line. The secret of the text is that it is close to the topic. So, forget the gossip, let's go straight to the following, and I'm sure you'll benefit from reading this article on how to merge two rows of mysql data into one line.
Using the SUM function, plus the GROUP BY staff ID, you can do this:
SELECT SUM (PZ+CPJS+BZ+GC+SB+TG+MJ+CL+CCLW+GJ+ZL+CBZZ) as count, SUM (PZ) as PZ,SUM (CPJS) as CPJS,SUM (BZ) as BZ,SUM (GC) as GC,SUM (SB) as SB,SUM (TG) as TG,SUM (MJ) as MJ,SUM (CL) as CL,SUM as CCLW,SUM (GJ) as GJ,SUM (ZL) as ZL,SUM (CBZZ) as CBZZ,SUM (YHID) as YHID,SUM (DJRMC) as DJRMC FROM tableName WHERE YHID='$ID' AND NF='$NF' GROUP BY YHID Is there anything you don't understand about how to merge two rows of mysql data into one line? Or if you want to know more about it, you can continue to follow our industry information section.
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.