How to implement two comma-separated strings and how to obtain intersection and subtraction by Oracle
This article mainly introduces Oracle how to achieve the separation of two comma strings and how to obtain intersection and difference sets, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to understand it.
To get the intersection of two fields (the same value) 2, get the difference set (difference value) of the two fields.
1. The final sql statement
1. Get the intersection (the same value):
Select regexp_substr (id,'[^,] +', 1, rownum) idfrom (select '1pr 2je 3dre 5' idfrom dual) connect by rownum