Such as 16 _4253116201_3600 * 1 * 4 after the string may take six of seven after eight this SQL how to write
CodePudding user response:
After the substr function, as to a few if not fixed, you can write a function to be good, let digits as a parameter toCodePudding user response:
- use substr, first get the length of the string, use length minus the length of the need to intercept plus 1 get from which a interception, the final parameter is the length of the interceptSELECT SUBSTR (' 16 _4253116201_3600 * 1 * 4 ',
LENGTH (' 16 _4253116201_3600 * 1 * 4 ') - 6 + 1,
6)
The FROM DUAL;
CodePudding user response:
How much we want to capture the value, to 6, 7, 8;More than this time to ask questions, check the document,
Select substr (' 16 _4253116201_3600 * 1 * 4, and 6) from dual;