
March 27th, 2003, 07:25 PM
|
|
Registered User
|
|
Join Date: Jan 2003
Location: Australia
Posts: 20
Time spent in forums: 18 m 32 sec
Reputation Power: 0
|
|
|
Error when altering SQL Server db table...HELP please!!!!
Okay so problem goes: I'm creating an asp system which uses a database. Initially I was using an Access database because it was straightforward, but now that development is nearing completion, its been transferred to SQL server. Now I didn't do this myself, but it was passed to my sys admin. and he converted it.
However, I have several auto-number fields (one in a number of tables), and although he knew this, didn't create them as such in the SQL database. The tables are empty luckily enough, but I now have to change them.
I have SQL Server 2000 (including Enterprise Manager etc.) on my machine, which I am using to access and modify my database which resides on another server.
I've tried to issue the following command in 'Query Analyzer', but it won't work.
Any ideas why not??? I'm getting the error "Incorrect syntax near keyword identity"....my belief was that this was the correct syntax, what am I doing wrong????
ALTER TABLE [dbo].[Employee]
ALTER COLUMN [Emp_num] INT identity (1,1)
|