I have created tables in the past that add a PK constraint using a single table but today I ran into the situation where I need to make a table that using 2 columns as it's primary key. I know it can be done and I know how to do it via the GUI but I am not sure how to do it via code. My current code is below and I need to make it so it uses both JDELocation and Product_Code as the PK. Can anyone tell me how to modify the CONSTRAINT command to accomplish this? I am on a SQL 2000 server.CREATE TABLE dbo.TerminalTankInfo( JDELocation varchar(4) NOT NULL, Product_Number varchar(4) NOT NULL, TankCapacity smallint NOT NULL, Active bit NOT NULL DEFAULT 1, CONSTRAINT PK_TerminalTankInfo_JDELocation PRIMARY KEY CLUSTERED (JDELocation ASC))
-- If I get used to envying others...Those things about my self I pride will slowly fade away.-Stellvia