求助大佬
sql吧
全部回复
仅看楼主
level 1
表A:
id name
a1 sa
a2 da
a3 asd
表B:
id test1 Aid
1 asda a1,a2
2 asd a2,a3
3 asd a1,a3
进行AB表关联查询,关联条件A表的id在B表的Aid中存在,如何查询
2021年06月29日 08点06分 1
level 2
select * from 表A inner join 表B
on 表A .id=表b.id
2021年06月29日 12点06分 2
错了吧,他的关联关系是表A ID=表B A ID
2021年07月02日 04点07分
level 8
select * from 表A , 表B
where 表A .id=表B.Aid
2021年07月06日 07点07分 3
level 1
你想要查出两表中,a1,a2,a3中对应的数据,可以用以下语法:
select * from 表A,表B
where 表A id=表B aid and 表A id=a1
2021年07月23日 16点07分 4
1