I have imported a bunch of excel spreadsheets into a SQL Server Database. Each table is named for a spreadsheet which represents one month. Now, the fields of each table are identical, being as the various tables represent different monthly data. What is the best way to add primary keys to these tables? I would like to use the Truck# field, but after adding that key to one table I get an error when altering other tables. The error is below.
Msg 2714, Level 16, State 4, Line 1
There is already an object named 'PK_Truck#' in the database.
Msg 1750, Level 16, State 0, Line 1
Could not create constraint. See previous errors.