当前位置:网站首页>If the field lines are the same, they will be merged into another field SQL statement?
If the field lines are the same, they will be merged into another field SQL statement?
2022-04-21 13:33:00 【CSDN Q & A】
As shown in the figure, if the field 1 The columns are the same , Put the corresponding Field 2 Add content to field 3

Thank you very much
sqlite mysql Every sentence can be
Take the answer :
There is a question that needs to be clarified , Field 3 is the result you want, isn't it ? It's not what it's supposed to be , If so , Then use the following statement to :
select Field 1,group_concat( Field 2) from table_name group by Field 1
If the field 3 There is always , Then we need to use max Take it out , Then associate the subquery with the above statement ,concat Just splice them together .
版权声明
本文为[CSDN Q & A]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204142122441677.html
边栏推荐
猜你喜欢

万字干货!帮你深度掌握设计中的「光影」知识点 (下)

STM32 drives st7789v2 TFT screen

Configuring VRRP (Virtual Router Redundancy Protocol) with Cisco

leetcode:824. 山羊拉丁文【简单字符串操纵】

nmap使用

北京大学ACM Problems 1009:Edge Detection

20210812

Access的BOM开发(3)BOM展开

Industry video super resolution new benchmark, Kwai & Dalian research, boarded CVPR 2022

How to uninstall openjdk and install Oracle JDK under CentOS
随机推荐
Detailed explanation of Flink related API development and operation architecture and implementation principle
Design and implementation of SSM college laboratory safety training system docx
leetcode:513. Find the value in the lower left corner of the tree [simply BFS find the first one in each layer]
一份很棒的外设驱动库!(基于STM32F4)
Technology giants compete to enter, who can become the "number one player" of the meta universe?
单体测试使用Assert.assertThat(expected,Matcher matcher)来对比结果和预期
53W words! Ali's first system performance optimization guide is so fragrant that it can be called the optimal solution of performance optimization
Wanzi dry goods! Help you deeply master the knowledge points of "light and shadow" in design (Part 2)
MySQL uses PIP and binlog2sql to install
Detailed explanation and demonstration of 3-4dom shaped XSS
Go language file operation
STM32驱动ST7789V2 tft屏幕
BUUCTF [第三章 web进阶]逻辑漏洞
OJ daily practice - piecewise function
做自媒体、短视频,不用自己拍视频,大周教你一个快速起号的方法
Initial response Kit
制造业中小企业转型能力建设分享
Hcip road OSPF expansion configuration
The course of qiniu business school allows Xiaobai to open an account to buy national debt reverse repurchase. Is it safe?
A great peripheral driver library! (based on stm32f4)