I am creating an invoice table and I'd like the ID to start with zero's because I will eventually concatenate the invoice # with a varchar
that will stay the same. For example, here is my table so far:
create table MCE_IDTest_av
(
invoice_id_num int not null Identity(100076,1) primary key,
invoice_id as ('MCE' + CONVERT(varchar, invoice_id_num)),
);
The invoice_id will be listed as "MCE100077", "MCE100078", etc. But, I'd like it to be "MCE0010076". Is there a SQL number datatype that start with zero's?