题目
有如下一张表F0825
列AID和BID是一对多的关系,希望将BID中同时存在3和5的AID找出来,预计的结果如下:
测试数据
代码语言:javascript复制CREATE TABLE G0518
(
AID INT,
BID INT
)
INSERT INTO G0518 VALUES (1,2);
INSERT INTO G0518 VALUES (1,5);
INSERT INTO G0518 VALUES (2,1);
INSERT INTO G0518 VALUES (2,3);
INSERT INTO G0518 VALUES (2,5);
INSERT INTO G0518 VALUES (3,4);
INSERT INTO G0518 VALUES (3,2);
INSERT INTO G0518 VALUES (3,5);