Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doubt in sybase

 
MInu
Ranch Hand
Posts: 517
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to change the type of a column of a table.eg: change a columen of type varchar to int
 
Julian Kennedy
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Adaptive Server 12 introduced the ALTER TABLE ... MODIFY syntax. You could try the following:

I think that probably relies on there being no rows in the table, however.

If you don't have Sybase 12 or later then it's the old create the new table; transfer the data; drop the old table and rename the new one trick.

Jules
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic