ALTER TABLE

S

Steve Huff

The following SQL works for me:

ALTER TABLE TEMP_TBLENTRY ALTER COLUMN IIN TEXT(50) PRIMARY KEY;

However - I need to set the name of the PrimaryKey index so I know how to
reference it in code and using the above statment sets it to some text that
appears to be random. I tried:

ALTER TABLE TEMP_TBLENTRY ALTER COLUMN IIN TEXT(50) PRIMARY KEY (PK);

and a few varients but nothing worked. Can someone point me in the right
direction? Thanks!!

-Steve Huff
 
V

Van T. Dinh

Try :

****Untested SQL****
ALTER TABLE TEMP_TBLENTRY
ALTER COLUMN IIN TEXT(50)
CONSTRAINT PK_TEMP_TBLENTRY PRIMARY KEY;



PK_TEMP_TBLENTRY should be the the name of the Index.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top