select a.ID,a.name,sex,b.ID,b.name,old from A full join B on a.ID=b,ID order by a.ID;
按下列方式试试。
select a.ID,a.name,sex,b.ID,b.name,old from A full join B on a.ID=b,ID
where (a.name is null and a.sex is null and b.name is not null) or
(a.name is not null and a.sex is not null and b.name is null)
order by a.ID;
select switch([店类型]="0102","店1",[店类型]="0103","店2"……) as 店名称,* from 你的表
switch后面可以加多个