4

Okay, so I'm not sure if this is possible but I need to change the primary key values in one table to match the FK values in another table.

What had happened is I created one table - POS_Transactions (FK REGISTER) - and imported its values, and then I created another table - Registers (pk REGISTERS_KEY) - and imported its values. But when I was importing the values for Registers, I came across some issues and had to clear the table and try it again multiple times (which is why the numbers go from 15-22, it just automatically updated that way) but I need them to say 1-8 so that it still connects to POS_Transactions.

Is there any way that I can change that?? And if so how do I do that? Sorry if that sounds stupid but I'm still new to SQL and I'm kind of stuck on what to do.

enter image description here

enter image description here

hts95
  • 103
  • 1
  • 1
  • 9

1 Answers1

3

Do a Truncate table and try again.

You need to reset the Identity column.

alexherm
  • 1,362
  • 2
  • 18
  • 31