I'm new to using SQL Server 2005 and I'm having problems with a SQL Query. The query is:
CREATE
TABLE Deliveries(CHAR(2) NOT NULL,S
P
CHAR(2) NOT NULL,QTY
SMALLINT NOT NULL, PRIMARY KEY (S,P) CONSTRAINT FKSuppliersFOREIGN KEY (S) REFERENCES Suppliers(S), CONSTRAINT FKProducts
FOREIGN KEY (P) REFERENCES Products(P)
)
When I run it I get the message:
Incorrect syntax near the keyword 'CONSTRAINT'.
I'm not sure if a column can be both Primary- and Foreign Key And I'm not sure if SQL SERVER supports all the SQL I'm using (of if I'm using it the right way).
Thanks in advance!

Using constraints in SQL Server 2005?
Galen Murdock
Hello again!
Thanks! Now it all works great ;)
minton
You missed keywords CONSTRAINT PK_Deliveries ..This compiled fine in my system.
TABLE Deliveries(CREATE
S
CHAR(2) NOT NULL,P
CHAR(2) NOT NULL,QTY
SMALLINT NOT NULL,CONSTRAINT
PK_Deliveries PRIMARY KEY (S,P),CONSTRAINT
FKSuppliersFOREIGN
KEY (S) REFERENCES Suppliers(S),CONSTRAINT
FKProductsFOREIGN
KEY (P) REFERENCES Products(P))