You can have a composite PK that consists of two (or more) keys but not two PK's

==========================================================================================================================A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

A decade ago when I taught Database Theory, my tests were take home week long projects.25 T/F25 Multiple Choice25 Fill in the blank25 point Essay question.

During each week long test, it was open book, open notes, open internet. If they had come here for help, I was fine with it. Real world, we get to use google. I didn't see the harm in it. Still don't. I think the most annoying thing about MCITP exams is the need to memorize a bunch of stuff I could look up in little to no time at all.

I seriously think the number of questions should be increased dramatically, but the internet should be availalbe. If you can get enough correct in 2 hours or whatever, then you get the cert. :)

By absolute definition, no. That's why it's called a "Primary" key and there can only be one primary.

In all practicality, yes. You can create a UNIQUE constraint on a NOT NULL column and for all practical intent and purposes it works the same way as a Primary Key. It's what some folks call an "AK" or "Alternate Key".

If this is for an interview, be sure to mention that the PK does NOT have to be the clustered index. You can only have one clustered index.

--Jeff Moden"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code: Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

In principle, yes. In practice it depends on what special functions or properties you want to assign to a primary key.

In the relational model a key is a minimal superkey - irreducibly unique and not permitting nulls. You can have more than one of those per relation. By convention when there is more than one such key then one of the keys is designated a "primary" one. But that primary designation doesn't make it "special" in any prescribed or fundamental respect. The choice and the difference (if any) between a primary key and a non-primary key is up to you.

Perhaps what you meant to ask is whether SQL's PRIMARY KEY constraint can be used more than once per table. The answer is no. It is an in-built limitation of SQL that PRIMARY KEY can only be used once per table. As Jeff says, you can use a UNIQUE constraint instead and that usually achieves the same things so the restriction on only having one PRIMARY KEY constraint per table isn't necessarily a serious limitation.

Absolutely no, period. The fact that separate unique constraints can be defined does not make them primary keys as well.

Similarly, a table could have 999 unique constraints that didn't allow nulls but not have a primary key.

SQL DBA,SQL Server MVP('07, '08, '09)

Prosecutor James Blackburn, in closing argument in the "Fatal Vision" murders trial: "If in the future, you should cry a tear, cry one for them [the murder victims]. If in the future, you should say a prayer, say one for them. And if in the future, you should light a candle, light one for them."