Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Adding an incremental number

Author  Topic 

kid_on_the_block
Posting Yak Master

172 Posts

Posted - 2006-01-19 : 02:54:03
Hi All

I have an existing table of students, the school now has decided to give then a General Record No.The table structure is as follows


Students
++++++++++++++

Name
Address
TelNo.

++++++++++++++


I have modified the table as



Students
++++++++++++++
GRN.
Name
Address
TelNo.

++++++++++++++

The data already exists in the table . I just want to add the GRN No. that would be incremental

E.g.

it should be 20060001 for the 1st record
20060002 for the second

The rest data should be as it is


Plz help


Thanks

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-01-19 : 03:26:49
You can define it as identity with starting value 20060001

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -