例えば下記の図でcol2の値が1,2をもつレコードを抽出したいときの
SQLを教えてください。
col1, col2
-------------
CD100,1 ←これ
CD100,2 ←これ
CD102,1
CD103,2
CD104,3
CD105,1 ←これ
CD105,2 ←これ
↓
結果は以下になるようなSQLです。
col1, col2
-------------
CD100,1
CD100,2
CD105,1
CD105,2
create table test(
col1 varchar2(50),
col2 int
);
insert into test values('CD100',1);
insert into test values('CD100',2);
insert into test values('CD102',1);
insert into test values('CD103',2);
insert into test values('CD104',3);
insert into test values('CD105',1);
insert into test values('CD105',2);
CD106,2
CD106,3
というレコードがあったときにはどういう結果が出ることを期待していますか?