Page 1 of 1

sql server with centos data type issue

Posted: 2017/12/07 06:15:40
by danijebx
I have SQL server.
i get the datas(japanese character) from sql server database through centos.
In sql server column datatype have varchar(10) but through centos the varchar(10) is not enough i need varchar(20) means ok.
how to get the original data ?

Re: sql server with centos data type issue

Posted: 2017/12/08 11:24:28
by oruji
you can update the length of varchar column from 10 character to 20 without losing the content like below:
ALTER TABLE YourTable ALTER COLUMN YourColumn VARCHAR (20) NOT NULL;

or leave it unspecified as

ALTER TABLE YourTable ALTER COLUMN YourColumn VARCHAR (20);