| Author |
Adding columns for all the tables in DB
|
Thyagarajan Ramanujam
Greenhorn
Joined: Mar 24, 2008
Posts: 25
|
|
Hi All, I want to add a new column named version with initial value 0 for all the tables present in a database. What can be done to do this? Any help is appreciated.
|
 |
vanlalhmangaiha khiangte
Ranch Hand
Joined: Sep 11, 2006
Posts: 169
|
|
You can write the sql code : alter table tablename add version integer default 0; Hope this helps ..
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
... and you can generate this script based on the database catalog. What database are you using?
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
 |
|
|
subject: Adding columns for all the tables in DB
|
|
|