**问题--为每个客户返回客户ID和地区--按区域对输出中的行进行排序--NULL排序在最后(非NULL值之后(
select custid
, region
from sales.Customers
order
by case when region is null then 1 else 0 end
, region
将查询更改为:
select custid
, region
, case when region is null then 1 else 0 end sorter
from sales.Customers
现在你能看到它在做什么吗?