P
Patience
If I follow the instructions below and create a PK from a table created by a
make-table query, will the PK eliminate any duplicate records (ie - only
allow one of each value)?
I want the Customer ID to become the PK, but unfortunately, there are
duplicate PKs in the database I'm pulling data from. Thus, I want the PK to
keep one of each Customer ID, and remove the rest.
Please help!
Patience
(instructions I found to create a PK from a make-table query)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
After you've run the make-table query, run something like this:
ALTER TABLE table_name ADD CONSTRAINT PK_table_name PRIMARY KEY (col1,
col2)
col1 & col2 are the names of the columns that make up the primary key.
You can use only one column if multiple columns are not required.
IOW, you can't designate any attributes during the make-table query to
add a PK.
make-table query, will the PK eliminate any duplicate records (ie - only
allow one of each value)?
I want the Customer ID to become the PK, but unfortunately, there are
duplicate PKs in the database I'm pulling data from. Thus, I want the PK to
keep one of each Customer ID, and remove the rest.
Please help!
Patience
(instructions I found to create a PK from a make-table query)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
After you've run the make-table query, run something like this:
ALTER TABLE table_name ADD CONSTRAINT PK_table_name PRIMARY KEY (col1,
col2)
col1 & col2 are the names of the columns that make up the primary key.
You can use only one column if multiple columns are not required.
IOW, you can't designate any attributes during the make-table query to
add a PK.