I have the following tables:
CUSTOMER: CustomerID, CustomerName
PROJECTS: ProjectID, ProjectName, CustomerID (referencing CUSTOMER.CustomerID)
Currently, customer ID's are from 1 to 999. I need to change thes existing records so that all customer ID's start with 5. In other words, add 5000 to CustomerID in all rows. Of course that won't work since the table is "connected" (I don't remember the correct word).
Are there any correct way of doing this? Built in functions?
Or do I manually have to delete the foreign keys, then update all rows manually in all referenced tables, then recreate the foreign keys?
Edit: I know changing ID's is not good practice etc, but let's just accept that it must be done in this case.
Edit2: I don't think it's duplicate to referenced question. They are asking about a stored procedure? And also accepted solution is apparently a bad solution?