select @area = area from mobile where mobile = left(@MobileNum,7) -----取到省份 if @area is null set @area = 'kuka'