当前位置:网站首页>SQL create temporary table
SQL create temporary table
2022-07-03 07:22:00 【Maple Leaf pear flower】
When querying data in the database , For example, query out type According to the unused value , Another alias , It's a little troublesome to cycle through the program , Now there is a way to connect the temporary table with the query table to query . So now you need to create a new temporary table , Then use the left join to join the query .
1、 Create a new temporary table
select '100' as val,'sc' as lx UNION select '200' as val,'zy' as lx UNION select '300' as val,'bg' as lx UNION select '600' as val,'yy' as lx 2、 Link query
select ty.*,ta.* from table ta left join (select '100' as val,'sc' as lx UNION select '200' as val,'zy' as lx UNION select '300' as val,'bg' as lx UNION select '600' as val,'yy' as lx ) ty on ty.lx=ta.lx边栏推荐
- gstreamer ffmpeg avdec解码数据流向分析
- 万卷书 - 价值投资者指南 [The Education of a Value Investor]
- 3311. 最长算术
- Distributed transactions
- 【已解决】SQLException: Invalid value for getInt() - ‘田鹏‘
- SecureCRT password to cancel session recording
- The education of a value investor
- Basic knowledge about SQL database
- Use of other streams
- Flask Foundation
猜你喜欢

IPv4 address

Inno Setup 制作安装包

Interfaces and related concepts

“百度杯”CTF比赛 2017 二月场,Web:爆破-1
![[HCAI] learning summary OSI model](/img/90/66505b22e32aa00b26886a9d5c5e4c.jpg)
[HCAI] learning summary OSI model

1. E-commerce tool cefsharp autojs MySQL Alibaba cloud react C RPA automated script, open source log

Homology policy / cross domain and cross domain solutions /web security attacks CSRF and XSS

Common APIs

SecureCRT取消Session记录的密码

Recursion, Fibonacci sequence
随机推荐
La différence entre le let Typescript et le Var
GStreamer ffmpeg avdec decoded data flow analysis
《指環王:力量之戒》新劇照 力量之戒鑄造者亮相
4279. 笛卡尔树
[attribute comparison] defer and async
Split small interface
I. D3.js hello world
TCP cumulative acknowledgement and window value update
Homology policy / cross domain and cross domain solutions /web security attacks CSRF and XSS
Use of other streams
TreeMap
【无标题】
[plus de détails] dernière entrevue complète redis (50)
[cmake] cmake link SQLite Library
Crontab scheduled task
树莓派更新工具链
专题 | 同步 异步
How to specify the execution order for multiple global exception handling classes
SecureCRT取消Session记录的密码
Laravel Web Framework