News

RIGHT() function will cut it off. In this following example, we are going to use 5 digits. SELECT RIGHT('00000' + CAST(c.CustomerID AS varchar(5)),5) AS CustomerID FROM Customers c; For good code ...