I have a table like below, I would reset the values in the table with some fake addresses. I have already have the fake addresses ready without identity columns. But I would keep the original addressID in the table, so that other table use it as FK still works.
Basically I want to keep the current table record with current identity columns values, and null out all the other columns and replace them with my new fake set of data, the order is not important, purpose is keep the values of existing identity columns.
what is the best way to do that, thanks
CREATE TABLE [dbo].[addMasterAddress](
[AddressID] [INT] IDENTITY(1,1) NOT NULL,
[HouseNumber] [INT] NOT NULL,
[StreetName] [VARCHAR](60) NOT NULL,
[StreetType] [VARCHAR](8) NULL,
[City] [VARCHAR](30) NOT NULL,
[County] [VARCHAR](30) NULL,
[State] [VARCHAR](2) NOT NULL,
[ZipCode] [VARCHAR](10) NOT NULL,
CONSTRAINT [PK_Address] PRIMARY KEY CLUSTERED
) ON [PRIMARY]
Below is some final data samples for the table.
INSERT [dbo].[addMasterAddress] ([AddressID], [HouseNumber], [StreetName], [StreetType], [City], [County], [State], [ZipCode])
VALUES (101179, 99996, N'Dogwood', N'Way', N'Seattle', N'King', N'WA', N'98101' ),
(101180, 100, N'Huron', N'ST', N'Seattle', N'King', N'WA', N'98101' ),
(101185, 30, N'Pioneer', N'ST', N'Seattle', N'King', N'WA', N'98101' )