Modify data type sql

1

I am trying to modify a data type from varchar (20) to varchar (50) I have this query ALTER TABLE ALUMNO MODIFY DESCRIPCION VARCHAR(40); but I have an error near MODIFY :

Incorrect syntax near 'MODIFY'.

Somebody could help me please.

    
asked by ARR 22.02.2018 в 15:52
source

1 answer

4

Your sentence corresponds more to MySQL and Oracle.

If you are on Sql Server you should use the following:

ALTER TABLE ALUMNO
ALTER COLUMN DESCRIPCION VARCHAR(40);

Here are examples with other engines

    
answered by 22.02.2018 / 15:54
source