I have a table like this:
ID URLIdentifier
1 google.com
2 youtube.com
3 baidu.com
and another table like this
URLID URL
1 www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=123
2 www.youtube.com/channel/UCl8dMTqDrJQ0c8y23UBu4kQ
3 www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=fadsfsafsa
4 www.baidu.com/s?wd=fdsafa&rsv_spt=1&issp=1&f=8&rsv_bp=0&rsv_idx=2&ie=utf-8&tn=baiduhome_pg&rsv_enter=0&rsv_sug3=7&inputT=1009
5 www.youtube.com/watch?v=5qanlirrRWs&list=PLbpi6ZahtOH5r5PlY8nQjm41h3UL_x8gl
6 www.youtube.com/watch?v=5aeKdmw9W50
7 v.baidu.com/v?ct=301989888&rn=20&pn=0&db=0&s=25&word=fdsafa&ie=utf-8&ie=utf-8
I want to select all the rows which the URL contain the URLIdentifier and here is the result like:
ID URLIdentifier URLID URL
1 google.com 1 www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=123'
1 google.com 3 www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=fadsfsafsa'
2 youtube.com 2 www.youtube.com/channel/UCl8dMTqDrJQ0c8y23UBu4kQ
2 youtube.com 5 www.youtube.com/watch?
v=5qanlirrRWs&list=PLbpi6ZahtOH5r5PlY8nQjm41h3UL_x8gl
2 youtube.com 6 www.youtube.com/watch?v=5aeKdmw9W50
3 baidu.com 4 www.baidu.com/s?wd=fdsafa&rsv_spt=1&issp=1&f=8&rsv_bp=0&rsv_idx=2&ie=utf-8&tn=baiduhome_pg&rsv_enter=0&rsv_sug3=7&inputT=1009
3 baidu.com 7 v.baidu.com/v?ct=301989888&rn=20&pn=0&db=0&s=25&word=fdsafa&ie=utf-8&ie=utf-8
Imagine there are hundreds of URLIdentifier and millions of URLs so I will need a script that select all rows.