切割pl / sql中的数字 [英] Cutting numbers in pl/sql
本文介绍了切割pl / sql中的数字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
伙计我有1个问题我有1列,其中我有数字,如995551808080
只有更改是在95551之后,我想从那里切掉所有不道德的数字,我想在那里只有995551< ;<这个号码可以帮我一些脚本吗?
Guys I have 1 question i have 1 column where i have numbers like 995551808080
only change is after 95551 and i want to Cut all unececary Numbers from there and i want to be there only 995551 << this number can you help me with some script?
推荐答案
这很简单!
It's very easy!
SELECT SUBSTR('995551808080', 1, 6);
-- returns: '995551'
在MSSql中/>
Sol 1: - 选择左('995551121212',6)
输出: - 995551
使用子串完美: -
Sol 2: - 选择子串('995551121212',1,6)
OutPut : - 995551
In MSSql
Sol 1: - Select Left ('995551121212',6)
Output :- 995551
Use Substring Fuinction :-
Sol 2 :- Select Substring ('995551121212',1,6)
OutPut :- 995551
现在我搜索并找到substr<<减少数字的功能
Now i Search and Found substr << function that cut numbers how you want
这篇关于切割pl / sql中的数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文