Create a column that grows from the last index
I need to create a column for InvoiceID. and I want to store the formula of this column like this
INV0000001,
INV0000002,
.
.
.
.
INV0000010,
INV0000011,
.
. and so on.
As you can see, this column is incremented with the last index. How can i do this.
I am using SQL Server 2012.
I searched but couldn't find how to increase a number like this.
+3
source to share
3 answers