jstiegelmeyer
Programmer
Does anyone know the correct syntax for Altering the type of a field to "int identity"? I need the field to be an autokey, but it is currently only an int. I can't make the change manually because the database is in production in a number of sites outside of my reach. Does anyone know the correct syntax using Visual Basic, ADO and MS SQL Server?
I've tried:
Alter Table MyTable Alter Column MyCol int identity
And get the following error:
Incorrect syntax near the keyword 'identity'..
If I just use "int" instead of "int identity", it executes without errors, but that doesn't solve my problem.
If anyone has any ideas, or a useful website for me to look at, it would be greatly appreciated.
Thanks,
Jamie
I've tried:
Alter Table MyTable Alter Column MyCol int identity
And get the following error:
Incorrect syntax near the keyword 'identity'..
If I just use "int" instead of "int identity", it executes without errors, but that doesn't solve my problem.
If anyone has any ideas, or a useful website for me to look at, it would be greatly appreciated.
Thanks,
Jamie