File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
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 agree. 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