Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Refactoring for Software Design Smells: Managing Technical Debt
this week in the
OO, Patterns, UML and Refactoring
JDBC and Relational Databases
Adding columns for all the tables in DB
Joined: Mar 24, 2008
Nov 25, 2008 03:11:00
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.
Joined: Sep 11, 2006
Nov 25, 2008 03:15:00
You can write the sql code :
alter table tablename add version integer default 0;
Hope this helps ..
Joined: Apr 14, 2004
Nov 25, 2008 03:29:00
... and you can generate this script based on the database catalog. What database are you using?
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Adding columns for all the tables in DB
I have fresh new 80 tables in DB, but with no data. Any utility to populate dummy data in all table
SQL command to show tables
Row level lock in Hibernate
getPrimaryKeys() method of DatabaseMetaData
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015