Get the App
SLTechnology News&Howtos  ›  Database  › 

How to implement two comma-separated strings and how to obtain intersection and subtraction by Oracle

Shulou Source: shulou.com Published: 2022-05-31 22:22:08 10月03日 Update

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

Tags: Character string regular result parameter intersection difference expression two field Guangdong function size article retrieval comma Guangzhou Shenzhen processing same Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Xiaomi Apple Redmi macOS