当前位置:网站首页>MySQL if else use case use
MySQL if else use case use
2022-07-05 13:43:00 【Php_ XiaoZhi】
SELECT
b.id AS " Device owners id",
b. NAME AS " Name of device owner ",
CONCAT(b.tel, '\t') AS " Device owner's phone ", -- export csv Set to normal text Id card 、 cell-phone number 、 Digital order number, etc
CONCAT(a.cdkey, '\t') AS " equipment sn code ",
IF (a.fromId = 0, " company ", c. NAME) AS " Name of transferor ", -- If 0 Show company , Other display query names
IF (a.fromId = 0," company ",CONCAT(c.tel, '\t')) AS " Dispatcher's telephone ",
( case when a.type = 1 then " purchase "
when a.type = 2 then " exchange "
when a.type = 3 then " Activate "
end) AS " operation ", -- Multi condition judgment
FROM_UNIXTIME(a.created_at, '%Y-%m-%d %H:%i:%s') AS " Recording time " -- Timestamp conversion time format
FROM
db_user_pos_record_detail AS a,
db_user AS b,
db_user AS c
WHERE
cdkey = '123456'
AND b.id = a.toId
AND c.id = b.pid
边栏推荐
- Shandong University Summer Training - 20220620
- Kotlin协程利用CoroutineContext实现网络请求失败后重试逻辑
- Go string operation
- 【Hot100】34. Find the first and last positions of elements in a sorted array
- Shuttle INKWELL & ink components
- restTemplate详解
- Summit review | baowanda - an integrated data security protection system driven by compliance and security
- Win10 - lightweight gadget
- 今年上半年,通信行业发生了哪些事?
- RK3566添加LED
猜你喜欢

什么是网络端口

记录一下在深度学习-一些bug处理

Catch all asynchronous artifact completable future

法国学者:最优传输理论下对抗攻击可解释性探讨
![[深度学习论文笔记]UCTransNet:从transformer的通道角度重新思考U-Net中的跳跃连接](/img/b6/f9da8a36167db10c9a92dabb166c81.png)
[深度学习论文笔记]UCTransNet:从transformer的通道角度重新思考U-Net中的跳跃连接

zabbix 监控

Binder communication process and servicemanager creation process
![[深度学习论文笔记]使用多模态MR成像分割脑肿瘤的HNF-Netv2](/img/52/5e85743b1817de96a52e02b92fd08c.png)
[深度学习论文笔记]使用多模态MR成像分割脑肿瘤的HNF-Netv2
![[public class preview]: basis and practice of video quality evaluation](/img/d8/a367c26b51d9dbaf53bf4fe2a13917.png)
[public class preview]: basis and practice of video quality evaluation

Summit review | baowanda - an integrated data security protection system driven by compliance and security
随机推荐
French scholars: the explicability of counter attack under optimal transmission theory
个人组件 - 消息提示
FPGA 学习笔记:Vivado 2019.1 添加 IP MicroBlaze
Record in-depth learning - some bug handling
Huawei push service content, read notes
ELFK部署
With 4 years of working experience, you can't tell five ways of communication between multithreads. Dare you believe it?
53. Maximum subarray sum: give you an integer array num, please find a continuous subarray with the maximum sum (the subarray contains at least one element) and return its maximum sum.
Parsing XML using Dom4j
Resttemplate details
go map
53. 最大子数组和:给你一个整数数组 nums ,请你找出一个具有最大和的连续子数组(子数组最少包含一个元素),返回其最大和。
Aikesheng sqle audit tool successfully completed the evaluation of "SQL quality management platform grading ability" of the Academy of communications and communications
STM32 reverse entry
Write API documents first or code first?
一网打尽异步神器CompletableFuture
Go pointer
Solve the problem of "unable to open source file" xx.h "in the custom header file on vs from the source
zabbix 监控
web3.eth. Filter related