select a.LineNo,b.LineNo from (select NO,LineNo from A WHERE LineNo LIKE '%-1') a inner join
(select NO,LineNo from B WHERE LineNo LIKE '%-2') b on a.NO=b.NO
这里找出no相等但是 lineno既包含-1 又包含-2的结果集
select a.LineNo,b.LineNo from (select NO,LineNo from A WHERE LineNo LIKE '%-1') a inner join
(select NO,LineNo from B WHERE LineNo LIKE '%-2') b on a.NO=b.NO
这里找出no相等但是 lineno既包含-1 又包含-2的结果集
本文标题:SQL 2个查询结果然后进行关联查询
本文链接:https://www.haomeiwen.com/subject/roelhjtx.html
网友评论