The PRIMARY KEY
constraint enforces uniqueness. Since the primary key of the table is the OBJECTID
column, it's not possible to insert another row with the same OBJECTID
value.
In order to have two rows with the same OBJECTID
value in the table, you would need to change the PRIMARY KEY
of the table to include some other column (or columns) to make it unique.
For example, you could add another column EXPORT_MONTH
. Rows from the SeptExport
table would have one value, and rows from the OctExport
table would have a different value, so both rows could be added to the table.
ALTER TABLE LatestData ADD EXPORT_MONTH VARCHAR(12) NOT NULL DEFAULT '';
You can set the value of the existing rows to something other than empty string using an UPDATE statement.
Changing the PRIMARY KEY constraint can be a bit more complicated, especially if you have foreign key references. But you'll need to end up with a primary key constraint like this:
PRIMARY KEY (OBJECTID, EXPORT_MONTH)
(Sometimes, creating a new table, and then copying rows from the existing table, and the renaming the tables is the way to go to make a change like this.)
Net result is that you could have rows like this in your table:
OBJECTID EXPORT_MONTH LINING_MATERIAL
-------- ------------ ---------------
12345 SeptExport Aluminum
12345 OctExport Platinum
(I'm not exactly clear on what you're asking, but given OBJECTID
has a unique constraint, it's not possible to have two rows with the same value in OBJECTID
.)