当前位置:网站首页>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
边栏推荐
- File operation serialization recursive copy
- Common problems in io streams
- docket
- Flask Foundation
- Advanced API (byte stream & buffer stream)
- Realize the reuse of components with different routing parameters and monitor the changes of routing parameters
- [attribute comparison] defer and async
- 691. Cube IV
- New stills of Lord of the rings: the ring of strength: the caster of the ring of strength appears
- JUC forkjoinpool branch merge framework - work theft
猜你喜欢
Common problems in io streams
在 4EVERLAND 上存储 WordPress 媒体内容,完成去中心化存储
[vscode - vehicle plug-in reports an error] cannot find module 'xxx' or its corresponding type declarations Vetur(2307)
带你全流程,全方位的了解属于测试的软件事故
Store WordPress media content on 4everland to complete decentralized storage
Use of file class
7.2 brush two questions
PAT甲级真题1166
1. E-commerce tool cefsharp autojs MySQL Alibaba cloud react C RPA automated script, open source log
Mise en place d'un environnement de développement de fonctions personnalisées
随机推荐
Realize the reuse of components with different routing parameters and monitor the changes of routing parameters
Upgrade CentOS php7.2.24 to php7.3
Thoughts on project development
The difference between typescript let and VaR
Jeecg request URL signature
萬卷書 - 價值投資者指南 [The Education of a Value Investor]
GStreamer ffmpeg avdec decoded data flow analysis
[Fiddler actual operation] how to use Fiddler to capture packets on Apple Mobile Phones
【CMake】CMake链接SQLite库
Map interface and method
691. 立方体IV
The embodiment of generics in inheritance and wildcards
Common analysis with criteria method
php artisan
Introduction of transformation flow
Jeecg menu path display problem
树莓派更新工具链
【已解决】win10找不到本地组策略编辑器解决方法
LeetCode
Wireshark software usage