Consider this sample table "Table 1".
Col1 Col2
A 1
B 1
A 4
A 5
A 3
A 2
D 1
B 2
C 3
B 4
I am trying to extract these values ββfrom Col1, which matches all the values ββ(in this case 1,2,3,4,5). Here, the query result should return βAβ, since none of the others has all the values ββ1,2,3,4,5 in Col2.
Note that the values ββin Col2 are determined by other parameters in the query, and they will always return some numerical values. From these values, the query should retrieve the values ββfrom Col1 that match all in Col2. The values ββin Col2 may be, for example, 11,12,1,2,3,4 (which does not necessarily mean in sequence).
I tried the following select query:
select distinct Col1 from Table1 where Col1 in (1,2,3,4,5);
select distinct Col1 from Table1 where Col1 exists (select distinct Col2 from Table1);
. , "" Col2, "".
like Col1, Col2 ' 1 5.
.