create database test1 use test1 create table admin ( id int PRimary key , name varchar(50), pwd varchar(50), ) insert into admin values(1,'aa','aa') alter table admin add tel varchar(50) NULL select * from admin
select * from admin if exists (select * from syscolumns where id=object_id('admin') and name='mms') print '已经存在该字段' alter table admin add tel varchar(50) NULL
alter table admin alter column name set bbs varchar(50) null alter table tablename drop column oldfield