UserId=1テーブル A whereとテーブル B whereから行を選択したいUserName=xxx。
A と B の行が同じ場合、グループを使用できます。
表 A
Session UserId
-----------------
1 1
2 2
表 B
Session Username
-------------------
1 xxx
11 xxx
12 xxx
ユーザーテーブル
UserId Username
------------------
1 xxx
where userid = 1ここで、テーブル a とテーブル b から行を取得したいと考えていますwhere username = xxx。a と b のセッションが同じ場合、グループ化できます。
Session
==========
1
11
12