View Single Post
  #1 (permalink)  
Old November 25th, 2006, 03:15 PM
samnachilomo samnachilomo is offline
Registered User
 
Join Date: Nov 2006
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Changing Data type

Hi

I have created a table with SQL server 2000 and I had a field named filedID with tinyint as the datatype. Now I want to change the datatype to SMALLINT.
I am doing it by using ALTER TABLE as follows

ALTER TABLE Table1
ALTER FIELD filedID SMALLINT

I am getting an error message


Server: Msg 170, Level 15, State 1, Line 2
Line 2: Incorrect syntax near 'FIELD'.


My question is how can I change a field data type if I already created a field with a different datatype before?

Thanks


Sam

Reply With Quote