select a.id,ISNULL(CAST(b.w AS NVARCHAR(10)),N'默认值') FROM  a 
LEFT JOIN
      b ON a.ID = b.aid