| Author |
alter table command
|
Arun R. S. Chandran
Ranch Hand
Joined: Oct 08, 2008
Posts: 81
|
|
Hi, I am using hibernate. Is there any query we can use for altering a table? If it is possible please reply me. -Arun
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
This is not something you should be doing with Hibernate. If you alter a table, you invalidate any object mapped to it. Hibernate does support dynamically creating and updating scheama at start up. Have a look at the hbm2ddl properity in the configuration docs. Hibernate also allows you to run native SQL (check the Session class's JavaDocs). But like I said, not a safe thing to do if the table is mapped.
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
Arun R. S. Chandran
Ranch Hand
Joined: Oct 08, 2008
Posts: 81
|
|
Thanks Paul
|
 |
 |
|
|
subject: alter table command
|
|
|