1 ALTER TABLE aal DROP COLUMN idd 2 ALTER TABLE aal ADD COLUMN age-------------------------------------- 看见了么, 那支蛾子, 正飞向太阳, 那就是我! --------------------------------------
up!有高手在嗎?csdn的人气一向都是很旺的呀~
很笨的方法,gzselect * into #tmp from aa1 truncate table aa1alert table aa1 drop column idd alert table add idd int not nullinsert into aa1 select * from #tmp
請朋友們在回答我的問題時分兩個問題分別回答, 這樣我看的清楚些,或者你是回答其中的一個問題, 你說明第几個問題就OK,thanks in advance!
select * into #tmp from aa1 drop table aa1CREATE TABLE [aa1] ( [Idd] [int] IDENTITY (1, 1) NOT NULL , [ID] [char] (10) NULL , [ages] [int] NULL, [Name] [char] (10) NULL , [nums] [int] NULL ) ON [PRIMARY]
剛才csdn告訴我提前的太頻繁了,沒有辦法,問題沒有解決,急啊!
alter table tablename add id1 intupdate tablename set id1=idalter table tablename drop column idexec sp_rename 'tablename.id1','id'
能否直接插入一列我要先研究一下。
ALTER TABLE aal DROP COLUMN idd
2 ALTER TABLE aal ADD COLUMN age--------------------------------------
看见了么,
那支蛾子,
正飞向太阳,
那就是我!
--------------------------------------
truncate table aa1alert table aa1 drop column idd
alert table add idd int not nullinsert into aa1 select * from #tmp
這樣我看的清楚些,或者你是回答其中的一個問題,
你說明第几個問題就OK,thanks in advance!
drop table aa1CREATE TABLE [aa1] (
[Idd] [int] IDENTITY (1, 1) NOT NULL ,
[ID] [char] (10) NULL ,
[ages] [int] NULL,
[Name] [char] (10) NULL ,
[nums] [int] NULL
) ON [PRIMARY]
不能解決問題的
http://expert.csdn.net/Expert/topic/1833/1833771.xml?temp=.8108789