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
 General SQL Server Forums
 New to SQL Server Programming
 Altering a table

Author  Topic 

aoriju
Posting Yak Master

156 Posts

Posted - 2010-06-01 : 08:26:22
Dear all,

I have a table with 4 columns.
Almost 100000 records in table
i want to add one column Class_Id into table with default value 0
We can use alter syntax..

My Question is
Alter a table with update the existing records with some value




Thanks & Regards
Riju A.O

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-06-01 : 08:28:24
First alter the table and then run your update statement.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-06-03 : 04:25:27
Note that default value will set to each INSERT statement
For modifying the existing data, you need to run update statement

Madhivanan

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

- Advertisement -