i have a doubt. i have a table t1 with columns say c1 and c2. now i want to make the column c1 as my primary key. how to issue a query to do so in sql server 2000 to get executed in sql query analyzer? every time i do with alter cmds, it shows that the column c1 already exists!!!you should be using the ALTER TABLE and ALTER COLUMN commands.
ALTER TABLE MyTable ALTER COLUMN myColumn [int] IDENTITY (1, 1) NOT NULL
Take a look at Books on Line (BOL) some time.
No comments:
Post a Comment