Not sure the best way to do this or if there is even a single best answer but here is the problem:
I have a SQL Server 2000 database that consists of at least 13 tables. Some of the tables have a unique id (SysName
) so that there can only be one unique SysName
value (alpha001, alpha002, alpha003
, etc).
With me so far?
Now, the client is wanting to be able to insert multiple sysnames
values in the database (alpha001, alpha001, alpha001, alpha002, alpha002, alpha003, alpha003, alpha003, alpha003, alpha003, etc). On top of that, if you change the value for a sysname (alpha001 to beta001) in one table, the value in some of the other tables are also updated (I'm having a brain fart about what this is called at the moment).
I'd also like to add a new column (SysNameID
) and set it to autoincrement. What is the best way to do this so that it will go through the database and just add the SysNameID
values (1,2,3,4,5,6...) so that I do not have to rebuild the table?
I'm thinking I need to add a SysNameID
column to all the affected tables and set the (brain fart term) between the tables to retain the correlation (for data integrity purposes).
If this is request is unclear, please leave a comment and I'll do the best I can to answer it. Some of you guys are very smart so you may have to dumb it down for me. :)