嗨,我现在有下表退出col1 [英] Hi, I have table below now exiting col1
本文介绍了嗨,我现在有下表退出col1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我现在有桌子
退出
col1 col2 col3
1000 2203A 2
1375 2203 2
482 2237 3
1000 2237A 3
>
i想要一个选择查询来获取数据如下所示col2带有后缀(2203A)应该在col1中得到无后缀(2203)的COL1值
期望输出
<前lang =text> col1 col2 col3
192 22031 1
1375 2203A 2
1375 2203 2
482 2237 3
482 2237A 3
我的尝试:
(重复与上述相同)
解决方案
... WHERE COL2 LIKE'%2203%'ORDER BY COL2
Hi,
I have table below now
exiting
col1 col2 col3
1000 2203A 2
1375 2203 2
482 2237 3
1000 2237A 3
i want a select query to get data AS BELOW for col2 with suffix(2203A) should get COL1 value of suffixless(2203) in col1
desired OUTPUT
col1 col2 col3
192 22031 1
1375 2203A 2
1375 2203 2
482 2237 3
482 2237A 3
What I have tried:
(Repeated the same as above)
解决方案
... WHERE COL2 LIKE '%2203%' ORDER BY COL2
这篇关于嗨,我现在有下表退出col1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文