当前位置:网站首页>MySQL ---- where后使用字段别名
MySQL ---- where后使用字段别名
2022-06-13 01:28:00 【小白一起学编程】
MySQL 是不支持这种骚操作的
比如
SELECT
left(A.PURC_MAT_KIND_CODE,2) as "zs",
A.*
FROM
wlplat.V_MATERIAL_CODE_STOCKPILE A
WHERE
A.MAT_STATUS = '2'
and zs in ("50","52")
哪我就是想用怎么办,那就用套娃来实现嘿嘿
SELECT
*
FROM
( SELECT LEFT ( A.PURC_MAT_KIND_CODE, 2 ) AS "zs", A.* FROM wlplat.V_MATERIAL_CODE_STOCKPILE A ) A
WHERE
A.MAT_STATUS = '2'
AND A.zs IN ( "50", "52" )
边栏推荐
- Several categories of software testing are clear at a glance
- Leetcode-9-palindromes (simple)
- RSA encryption colloquial explanation
- Sliding window summary of TCP connections
- #pragma comment(lib,“urlmon.lib“)
- leetcode. 349. intersection of two arrays
- QT color extraction
- Leetcode-78- subset (medium)
- leetcode. 541. reverse string II
- Alexnet implements image classification of caltech101 dataset (pytorch Implementation)
猜你喜欢

FLIP动画实现思路

Leetcode 05 tree

Go JWT learning summary

MySQL index
![[Andoid][踩坑]CTS 11_r3开始出现的testBootClassPathAndSystemServerClasspath_nonDuplicateClasses FAIL问题分析](/img/b5/7ea603775dc0448368d209de037a43.png)
[Andoid][踩坑]CTS 11_r3开始出现的testBootClassPathAndSystemServerClasspath_nonDuplicateClasses FAIL问题分析

论文笔记:STMARL: A Spatio-Temporal Multi-AgentReinforcement Learning Approach for Cooperative Traffic

Method of cleaning C disk

切线与切平面

Page optimization - Notes

spiral matrix visit Search a 2D Matrix
随机推荐
Transaction characteristics and isolation levels
Work and life
redis
MySQL index
The second round of mesa
A problem discovery and attempted solution to the strange stop of server script
On February 26, 2022, the latest news of national oil price adjustment today
redis
Anims of phaser3
V-inline-date, similar to Ctrip, flying pig, time selection with price
Happy string
H5 open the app. If the app is not downloaded, jump to the download page. If the app has been downloaded, wake up the app
np.concatenate中axis的理解
D template instance does not match declaration
[从零开始学习FPGA编程-21]:进阶篇 - 架构 - VerilogHDL编码规范
Use koa to mock data and set cross domain issues
Leetcode question brushing 06 bit operation
Rasa对话机器人之HelpDesk (三)
How many times does the constructor execute?
Introduction to convolutional neural network