Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

syntax error ?!

Status
Not open for further replies.

babeo

Technical User
Mar 30, 2000
398
CA
I get an error with the following command
ALTER TABLE MyTable MODIFY Dest varchar(11)

I just want to change to length of the column Dest from 10 to 11 only, and there is no dependencies for this table , but I have error of "Incorrect syntax near 'MODIFY' ", which I don't see "any" syntax error at all !

could someone tells me why?
Thanks
 
Use ALTER COLUMN in place of modify

Code:
ALTER TABLE MyTable ALTER COLUMN Dest varchar(11)

"Shoot Me! Shoot Me NOW!!!"
- Daffy Duck
 
Thanks MDXer,
I did not mention that my MS SQL version is 6.5, so the command for version 2000 above will give me syntax error too.

I think I have to recreate a new table and insert all data from old table to the new table.
Thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top