Maintain two tables (a and b). Table a has K1 auto increment primary key. Table b has K2 auto increment primary key. Reference table b containing primary key K2 in table a as a foreign key on K2. For each insertion batch, advance table b and insert the scope_identity()
/ output inserted.K1
value as K2 reference.
Is that what you are looking for?