If I have two substring_index, which one get executed first? the internal one substring_index(
mycol,'/',3)
, or the external one ?
substring_index(substring_index(`mycol`,'/',3),'://',-1)
Examples of sting I want to treat:
https://www.yahoo.com/
http://google.com/en/
I want to get:
www.yahoo.com
google.com
1) Which substring_index
get executed first? This important to know to construct the second substring_index
according to the output of what executed first.
2) Is my substring_index
statement correct?
Asu you can easy check
select substring_index(substring_index('https://www.yahoo.com/','/',3),'://',-1);
www.yahoo.com
select substring_index(substring_index('http://google.com/en/','/',3),'://',-1);
google.com
for each nested function is always exectued the inner one .. and recorsively the next outer
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments