跪求mysql关联语句
答案:1 悬赏:30 手机版
解决时间 2021-07-26 01:04
- 提问者网友:我是我
- 2021-07-25 00:51
要详细点,我菜鸟
最佳答案
- 五星知识达人网友:等灯
- 2021-07-25 01:54
CREATE TEMPORARY TABLE tmp_t1
(
DWDM VARCHAr(20),
DWMC VARCHAr(50),
TYPE INT
);
CREATE TEMPORARY TABLE tmp_t2
(
DWDM VARCHAr(20),
DWMC VARCHAr(50),
TYPE INT
);
SELECt * FROM (SELECt DWDM,DWMC FROM TMP_T1 WHERe TYPE=101) AS T1
JOIN (SELECt DWDM,DWMC FROM TMP_T2 WHERe TYPE=102) AS T2
ON T1.DWDM = T2.DWDM;
(
DWDM VARCHAr(20),
DWMC VARCHAr(50),
TYPE INT
);
CREATE TEMPORARY TABLE tmp_t2
(
DWDM VARCHAr(20),
DWMC VARCHAr(50),
TYPE INT
);
SELECt * FROM (SELECt DWDM,DWMC FROM TMP_T1 WHERe TYPE=101) AS T1
JOIN (SELECt DWDM,DWMC FROM TMP_T2 WHERe TYPE=102) AS T2
ON T1.DWDM = T2.DWDM;
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯