Suppressing the removal of leading zeros in numeric data I initially declared the data type of the columns for some of the tables I am working on as NUMERIC. Because of that, leading zeros are being removed.  Is there anyway to suppress this behavior?  I need to preserve the leading zeros, since 08 should be considered different from 0000008.

One solution is to changing the definition of the table and changing the numeric to varchar datatype.

Is there any other way to achieve this without changing the table structure?
Retaining leading zeros for numeric data types is not possible.  Since you appear to be using this column as a non-numeric identifier, you should consider using a varchar column of appropriate length.

If the maximum length you're willing to accept in the table is 11 characters, and the value is always required, I would define the column like this:

someCol varchar(11) NOT NULL


The column will then differentiate between 08 and 000008, and the leading zeros will be retained.