Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alter table to create primary key, on two fields

Status
Not open for further replies.

Blorf

Programmer
Dec 30, 2003
1,608
US
Hi. Need syntax help.

I have a table called "ExtdDesc_Local" with 3 fields,

ItemNumber
SEQNumber
Text

I need to alter the table to have the primary key be on ItemNumber & SEQNumber.

I need a Query to do it, because it will be run often when this table is created with a make table statement.

I appreciate any help,
ChaZ

There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That Don’t.
 
Maybe
Code:
ALTER TABLE MyTable
ADD CONSTRAINT pk_Item_Seq_Numbers
PRIMARY KEY (ItemNumber, SEQNumber)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top