網(wǎng)站首頁 編程語言 正文
一、Mysql
使用concat函數(shù)
## 可以拼接多個(gè)列
select concat(app_name,',',url) as str from apps
# 使用concat_ws函數(shù)
## CONCAT_WS(separator,str1,str2,...)
## separator,分隔符
## str1,str2為要拼接的字符
select CONCAT_WS(',',app_name,url) as str from apps
二、Oracle
-- 使用concat函數(shù)
---- 只能傳兩個(gè)參數(shù),因此,如果需要拼接多個(gè)字符串,可是嵌套concat函數(shù)達(dá)到需求,不過不推薦
select concat(app_name,url) as str from apps
-- 使用 ||
---- 可以拼接多個(gè)字符
select app_name || ',' || url as str from apps
三、SQLServer
+號(hào)連接,列名用+連接查詢
四、UNION
select tp.combination_name as t
from
t_service_price as tp;
UNION
select tp.subheading as t
from
t_service_price as tp;
原文鏈接:https://blog.csdn.net/qq_41512902/article/details/125716136
相關(guān)推薦
- 2023-07-30 element中對(duì)el-input 自定義驗(yàn)證規(guī)則
- 2023-11-20 帶寬單位是什么?帶寬單位詳解?帶寬單位如何換算?
- 2023-11-16 RuntimeError: Expected object of device type cuda
- 2023-01-21 VmWare安裝Centos后配置Net網(wǎng)絡(luò)SSH鏈接問題及解決_VMware
- 2022-06-12 Flask項(xiàng)目的部署的實(shí)現(xiàn)步驟_python
- 2022-04-16 pycharm全局修改方式_python
- 2022-12-09 python反射機(jī)制內(nèi)置函數(shù)及場(chǎng)景構(gòu)造詳解_python
- 2022-07-02 C++精要分析lambda表達(dá)式的使用_C 語言
- 最近更新
-
- window11 系統(tǒng)安裝 yarn
- 超詳細(xì)win安裝深度學(xué)習(xí)環(huán)境2025年最新版(
- Linux 中運(yùn)行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲(chǔ)小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎(chǔ)操作-- 運(yùn)算符,流程控制 Flo
- 1. Int 和Integer 的區(qū)別,Jav
- spring @retryable不生效的一種
- Spring Security之認(rèn)證信息的處理
- Spring Security之認(rèn)證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權(quán)
- redisson分布式鎖中waittime的設(shè)
- maven:解決release錯(cuò)誤:Artif
- restTemplate使用總結(jié)
- Spring Security之安全異常處理
- MybatisPlus優(yōu)雅實(shí)現(xiàn)加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務(wù)發(fā)現(xiàn)-Nac
- Spring Security之基于HttpR
- Redis 底層數(shù)據(jù)結(jié)構(gòu)-簡(jiǎn)單動(dòng)態(tài)字符串(SD
- arthas操作spring被代理目標(biāo)對(duì)象命令
- Spring中的單例模式應(yīng)用詳解
- 聊聊消息隊(duì)列,發(fā)送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠(yuǎn)程分支