create table wggfcusmq_A(ID int, Name varchar(10), Sex varchar(10))
insert into wggfcusmq_A
select 1, 'ww', 12 union all
select 2, 'aa', 13
create table wggfcusmq_B(ID int, Name varchar(10), Glass varchar(10))
delete wggfcusmq_B
insert into wggfcusmq_B
select 1, 'ww', 'A' union all
select 3, 'bb', 'B'
==============
select ISNULL(a.id,b.id)as ID,
name=ISNULL(a.name,b.name),
sex=ISNULL(sex,''),
class=ISNULL(Glass,'')from wggfcusmq_A a full join wggfcusmq_B b on a.id=b.id