CREATE TYPE SSN FROM varchar(20) NOT NULL ;create table test111
(id SSN not null,
name varchar(32) not null);insert into test111
select '11','test';test111类似的表有很多,而SSN需要扩展长度varchar(20)->varchar(30)不删除test111表,是否能够处理?
(id SSN not null,
name varchar(32) not null);insert into test111
select '11','test';test111类似的表有很多,而SSN需要扩展长度varchar(20)->varchar(30)不删除test111表,是否能够处理?
alter table test111 alter column id SSN not null
例如:alter table ...
基本上是逐个表进行处理的!不想逐个表写代码的话,就用动态SQL,但写起来稍有点麻烦...