Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一列包含以下格式的字符串:strin1/string2. 我需要string2参与并将其插入另一列,string3. 我知道substr( )函数,但这个函数需要我知道字符的索引 & 在我的情况下,这是不知道的。
strin1/string2
string2
string3
substr( )
substr(col, instr(col, '/')+1)
SELECT SUBSTRING_INDEX('string1/string2','/',-1);
像那样????