<p>I want to add a <em>column</em> to an existing legacy <em>database</em> and write a <em>procedure</em> by which I can assign each record a different value. Something like adding a <em>column</em> and autogenerate the data for it.</p>

<p>Like, if I add a new <em>column</em> called "ID" (number) I want to then initialize a unique value to each of the records. So, my ID <em>column</em> will have records from say <code>1 to 1000</code>.<br>
How do I do that?</p>

This will depend on the database but for SQL Server, this could be achieved as follows:
```
```
alter table Example
add NewColumn int identity(1,1)
```
```