alter table add 列名 但是提示列名无效
来源:百度知道 编辑:UC知道 时间:2024/05/05 04:49:49
请教,我修改现有临时表添加了一列,然后修改这一列的值,却提示刚添加的这一列无效。语句如下:
select * into #ta2 from #ta1
alter table #ta2 add fentry int null
update #ta2 set fentry = 1
select * into #ta2 from #ta1
alter table #ta2 add fentry int null
update #ta2 set fentry = 1
alter table 语法错误,少了个参数,可以尝试修改如下:alter table #ta2 add column fentry int null
不会啊,看起来代码没有错,alter table语法没有错的,
我用楼主的代码在sql server 2005测试通过的,不知道楼主
的问题根源是不是出现在其他地方,你可以试试一条一条来
执行,确认无误就继续,这样比较容易发现错误
--试试这样
select * into #ta2 from #ta1
go
alter table #ta2 add fentry int null
go
update #ta2 set fentry = 1
go
alter table add 列名 但是提示列名无效
alter table的问题
sql能用alter table修改列名吗
SQL 存储过程问题(alter table)
alter tale engine_pk add constraint fk_engine_car_pk foreign key(id) references car_pk(id)
在alter table 语句中定义视图的语法规则是什么
alter table [student] drop primary key (id) 我想删除主键,请问这句SQL语句错在哪儿?
javascript alter
alter修改字段
alter的用法