This is Regarding MSSQL auto increment feature and i have following table created
CREATE TABLE Order(
[order_id] [int] IDENTITY(1,1) NOT NULL,
[name] [varchar](50) NULL,
[original_order_id] [int] NOT NULL
)
In here i have a situation where i need to insert the auto generated value for original_id to original_order_id.
After googling few minutes following thing and it works fine for me
insert into Order values('Vegitable Order', IDENT_CURRENT('Order'))
I am using java application spring JDBC templates to execute the quires. can there be any issues? specially in multi threaded environment?