Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 adding column to table via QA

Author  Topic 

mike123
Master Smack Fu Yak Hacker

1462 Posts

Posted - 2005-12-06 : 17:42:06
I've always added columns to pre existing tables via EM, however in the past it has frozen sometimes and not been advisable from members at sqlteam to do so ...

I have a huge table which I'm sure will freeze if I try it remotely again, so my question is ...

How can I add a column onto my table via QA?

Thanks very much for any help!
Mike123

SamC
White Water Yakist

3467 Posts

Posted - 2005-12-06 : 17:49:35
ALTER TABLE MyTable ADD COLUMN MyColumn INT NOT NULL

Lookup ALTER TABLE in BOL for details...

Try it on a small table in a test DB first to get the syntax correct...
Go to Top of Page

mike123
Master Smack Fu Yak Hacker

1462 Posts

Posted - 2005-12-06 : 17:50:37
thanks SamC!!

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-12-07 : 01:54:21
>>ALTER TABLE MyTable ADD COLUMN MyColumn INT NOT NULL

That should be

ALTER TABLE MyTable ADD MyColumn INT NOT NULL


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -