如何判断一个表是否存在某字段,如果存在把该字段删除! if exists( select name from syscolumns where id=object_id('tn') and name='id')begin alter table tn drop column idend--tn为表名 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 if exists( select name from syscolumns where id=object_id('score') and name='id')begin alter table score drop column idend if exists(select * from syscolumns where id=object_id(N'score') and name=N'id') alter table score drop column id if exists(select * from syscolumns where id=object_id(N'score') and name=N'id') alter table score drop column id if exists (select column_name from table )begin alter table drop column column_nameend 在SQL2005中,关于单引号与双引号的用法 一个SQL查询语句问题 int 4的意思是什么,好象不是是4位数据,最大9999的意思吧?谢谢 请教各位大侠 SQL SERVER2000数据库连接问题!求助!!!! 如何插入数据库数据并且不产生日志? 如何用sql语句写一个定时完成的任务的job bcp_init问题(特急) 存储过程未声明变量 自制sql 2008&2000绿色免安装软件包,带控制面板和管理工具,欢迎试用 请教SQL高手:如何把字符串中第1、3、5、7。。。个字符给取出来,??? 检查照片是否存在、多余照片
begin
alter table score drop column id
end
alter table score drop column id
alter table score drop column id
begin
alter table drop column column_name
end