Oracle三表联查的方式查询两表

示例

SELECT A1.ID, A1.DEL_FLG, A1.CREATE_USER, A1.CREATE_TIME, A1.MODIFY_USER, A1.MODIFY_TIME, D1.DICT_NAME,D2.DICT_NAME FROM (T_ALARM_SET A1 LEFT JOIN T_DICT_INFO D1 ON (A1.TYPE=D1.DICT_VALUE) AND D1.DICT_TYPE='ATYPE') LEFT JOIN T_DICT_INFO D2 ON (A1.T_LEVEL=D2.DICT_VALUE) AND D2.DICT_TYPE='LEVEL';

 

posted @ 2019-08-17 18:18  墨柯  阅读(1624)  评论(0编辑  收藏  举报