select RIGHT('0000'+CAST( '123'  AS nvarchar(50)),4)
  
  select right('00000000'+'123',8) 
  
  

 

相关文章: