How to create a new table from an existing table?

后端 未结 3 737
南笙
南笙 2021-01-25 10:49
dbo.Profile_Updated
  (
     BusinessName VARCHAR,
     ContactName  VARCHAR,
     Address      VARCHAR,
     City         VARCHAR,
     State        VARCHAR,
     Posta         


        
3条回答
  •  迷失自我
    2021-01-25 11:05

    You are doing things in the wrong order. You should have the PostalDB table created and populated first with a name like PostalDBId as the primary key. The PostalDBId should be effectively meaningless. It should not be a zip code or anything like that.

    Then, your Profile_Updated needs a different primary key, something that's not related to the PostalDB table. You also want another field that is a foreign key to the PostalDb table.

提交回复
热议问题