我有两个名为 oc_users 和 oc_groups 的表,这两个表之间没有特定的关系,如下所示,所以在这里我想将每个用户映射到每个组:
1)表1:从oc_users中选择uid;
+-----------------+
| uid |
+-----------------+
| manesh@abc.in |
| pankaj |
| sumit |
+-----------------+
2)表2:从oc_groups中选择gid;
+---------+
| gid |
+---------+
| qlc |
| qlc-web |
+---------+
然后我想要像这样的o/p:
+---------+-----------------+
| gid | uid |
+---------+-----------------+
| qlc | manesh@abc.in |
| qlc | pankaj |
| qlc | sumit |
| qlc-web | manesh@abc.in |
| qlc-web | pankaj |
| qlc-web | sumit |
+---------+-----------------+