select *
from
(
select m.学号,SUM(欠费合计) as t
from table1 as m
where m.学号 not like '%人'
group by m.学号
)a
full join
(
select n.* from table2 as n
where n.欠费金额 != 0 AND n.学号 is not null
)b
on a.学号 = b.学号
from
(
select m.学号,SUM(欠费合计) as t
from table1 as m
where m.学号 not like '%人'
group by m.学号
)a
full join
(
select n.* from table2 as n
where n.欠费金额 != 0 AND n.学号 is not null
)b
on a.学号 = b.学号
select *
from
(
select m.学号,SUM(欠费合计) as t
from table1 as m
where m.学号 not like '%人'
group by m.学号
)a
full join
(
select n.* from table2 as n
where n.欠费金额 != 0 AND n.学号 is not null
)b
on a.学号 = b.学号
where isnull(a.欠费,0) <> isnull(b.欠费,0)
①依次选择“编辑”菜单、“IntelliSense”和“刷新本地缓存”。
②使用键盘快捷键 Ctrl+Shift+R。
③从数据库引擎的实例中断开您的编辑器窗口,然后重新连接。