当前位置:网站首页>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边栏推荐
- 最全SQL与NoSQL优缺点对比
- Advanced API (multithreading 02)
- II. D3.js draw a simple figure -- circle
- Store WordPress media content on 4everland to complete decentralized storage
- SecureCRT password to cancel session recording
- LeetCode
- C code production YUV420 planar format file
- When MySQL inserts Chinese into the database, there is a diamond question mark garbled code
- [solved] unknown error 1146
- Warehouse database fields_ Summary of SQL problems in kingbase8 migration of Jincang database
猜你喜欢

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

IP home online query platform

你开发数据API最快多长时间?我1分钟就足够了

JMeter test result output

C code production YUV420 planar format file

4279. 笛卡尔树

最全SQL与NoSQL优缺点对比

Common architectures of IO streams

Specified interval inversion in the linked list

IO stream system and FileReader, filewriter
随机推荐
Flask Foundation
Talk about floating
JMeter test result output
[plus de détails] dernière entrevue complète redis (50)
【已解决】SQLException: Invalid value for getInt() - ‘田鹏‘
The underlying mechanism of advertising on websites
Homology policy / cross domain and cross domain solutions /web security attacks CSRF and XSS
Interview questions about producers and consumers (important)
Advanced API (local simulation download file)
IPv4 address
3311. Longest arithmetic
PAT甲级真题1166
Chrome 98 Private Network Access problem w/ disabled web security: Request had no target IP address
Split small interface
[solved] sqlexception: invalid value for getint() - 'Tian Peng‘
深度学习参数初始化(一)Xavier初始化 含代码
[vscode - vehicle plug-in reports an error] cannot find module 'xxx' or its corresponding type declarations Vetur(2307)
Dora (discover offer request recognition) process of obtaining IP address
《指環王:力量之戒》新劇照 力量之戒鑄造者亮相
Basic knowledge about SQL database