Answers

Question and Answer:

  Home  Sybase

⟩ How To Change varchar(m) to varchar(n) in Sybase?

Before you start:

select max(datalength(column_name))

from affected_table

In other words, please be sure you're going into this with your head on straight.

How To Change System Catalogs

This information is Critical To The Defense Of The Free World, and you would be Well Advised To Do It Exactly As Specified:

use master

go

sp_configure "allow updates", 1

go

reconfigure with override /* System 10 and below */

go

use victim_database

go

select name, colid

from syscolumns

where id = object_id("affected_table")

go

begin tran

go

update syscolumns

set length = new_value

where id = object_id("affected_table")

and colid = value_from_above

go

update sysindexes

set maxlen = maxlen + increase/decrease?

where id=object_id("affected_table")

and indid = 0

go

 218 views

More Questions for you: