你看到的做法不行,表结构的更改怎么会不用alter table
应该是:
select * into ##temp from oldtable ;
truncate table oldtable;
alter table oldtable alter column phone varchar(10);
insert into oldtable select * from ##temp;
应该是:
select * into ##temp from oldtable ;
truncate table oldtable;
alter table oldtable alter column phone varchar(10);
insert into oldtable select * from ##temp;
把本表数据删掉,把类型该掉。再把数据搞回来