Alterar una columna, para cambiar "nulo" a "no nulo", cuando no se conoce el tipo de datos

399 Views Asked by At

I need to allow nulls in a column, but I don't know its data type. In oracle its possible to do this:

alter table MyTable modify MyField null;

the SQL server homologous statement requires the data type (in this example INT):

alter table MyTable alter column MyField int null;

Is there a way to do it like Oracle does?. The idea is not to have to go to the data dictionary to consult the types and build the sentence

Thanks,

0

There are 0 best solutions below