84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
学习是最好的投资!
MYSQL:
SELECT RIGHT(RTRIM(@Path), LOCATE('.',REVERSE(RTRIM(@Path))) - 1)
SQLSERVER:
SELECT RIGHT(RTRIM(@Path), CHARINDEX('.',REVERSE(RTRIM(@Path))) - 1)
Assume the @Path placeholder is your field. Idea: To find the last character ., reverse it and find the position of the first ., and then go to the original string to intercept the characters after ..
@Path
.
I don’t have MySQL at hand, but you can do this in Oracle:
select substr(PATH, instr(PATH, '.') + 1) from 表名
As for MySQL, you can just check if there are corresponding functions.
MYSQL:
SQLSERVER:
Assume the
@Path
placeholder is your field. Idea: To find the last character.
, reverse it and find the position of the first.
, and then go to the original string to intercept the characters after.
.I don’t have MySQL at hand, but you can do this in Oracle:
As for MySQL, you can just check if there are corresponding functions.