sql server with centos data type issue

A 5 star hangout for overworked and underpaid system admins.
danijebx
Posts: 1
Joined: 2017/12/07 06:00:14

sql server with centos data type issue

Postby danijebx » 2017/12/07 06:15:40

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 ?

oruji
Posts: 1
Joined: 2017/12/08 11:08:07
Contact:

Re: sql server with centos data type issue

Postby oruji » 2017/12/08 11:24:28

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);