EXPERT RESPONSE
No. A table can have only one primary key.
However, that primary key can consist of two columns.
For example, consider this table of DatabaseProducts:
Company Product Release
IBM DB2 5
Microsoft SQL Server 7.0
Microsoft Access 97
Oracle Oracle 8
Sybase ASE 12.5
As it stands, you could define this table with:
create table DatabaseProducts
( Company varchar(20)
, Product varchar(20)
, Release varchar(10)
, constraint DatabaseProductPK
primary key (Company, Product)
)
If you wanted the table to contain both Microsoft SQL Server 7.0 and
Microsoft SQL Server 2000, then the primary key would have to include the
Release column as well. For More Information
|