| Author |
Changing Primary Key
|
|
| Paul rust 2002-10-05, 9:07 pm |
| I would appreciate if anybody can give me the correct
syntax (if possible) to change a primary key of a table.
I want to amend the PK so that it ignores duplicate rows
on inserts
| |
| Tibor Karaszi 2002-10-05, 9:07 pm |
| Paul,
I don't think that this is possible in a PK declaration. You would have to create an index
instead and specify IGNORE_DUP_KEY.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=...ublic.sqlserver
"Paul rust" <Paul.Rust@cargosc.co.uk> wrote in message
news:e17701c25991$c6787bf0$36e
f2ecf@tkmsftngxa12...
> I would appreciate if anybody can give me the correct
> syntax (if possible) to change a primary key of a table.
> I want to amend the PK so that it ignores duplicate rows
> on inserts
| |
| Geoff N. Hiten 2002-10-05, 9:07 pm |
| No can do. Primary Key implies unique values. If you want to index on that
column, drop the PK and add a non-unique index.
--
Geoff N. Hiten
Senior Database Administrator
Careerbuilder.com
"Paul rust" <Paul.Rust@cargosc.co.uk> wrote in message
news:e17701c25991$c6787bf0$36e
f2ecf@tkmsftngxa12...
> I would appreciate if anybody can give me the correct
> syntax (if possible) to change a primary key of a table.
> I want to amend the PK so that it ignores duplicate rows
> on inserts
|
|
|
|