Auto increment avarchargreenspun.com : LUSENET : SQL Server Database Administration : One Thread
Need some help from you. How does one write a script that will auto increment a varchar field. Assuming that it is defined as the primary key of a table.
-- Anonymous, August 15, 2001
A varchar is character data. What do you mean when you ask about incrementing such a field?
-- Anonymous, August 21, 2001
I needed to use a varchar field as the primary key of a table but want a script that can generate the needed value on each insert.
-- Anonymous, August 22, 2001
I suggest a that you use an insert trigger that will do the incrementing.
Hope this helps,
-- Anonymous, August 23, 2001