sql - adding a unique id and PK to existing tables -


i have few tables created in mssql 2005 server. due inexperience @ time, tables created without primary key or unqiquely identifying column.

how can add column unique id (auto incrememnt?) table existing data (around 600k rows)?

i need primary key can start using sql analysis services.

many thanks,

adam

in t-sql:

alter table table_name  add id integer identity primary key not null 

but yaakov says, it's easy in ssms.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -