Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JDBC and the fly likes create table.. which method? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "create table.. which method?" Watch "create table.. which method?" New topic
Author

create table.. which method?

tormod eriksen
Ranch Hand

Joined: Jan 23, 2002
Posts: 52
Hi,
I wonder is it fine to use any of the two methods
-Statement : execute
-Statemetn : executeUpdate
when one is to pass a create table .. ddl statement to a database?
tormod
Rajendar Goud
Ranch Hand

Joined: Mar 06, 2002
Posts: 220
Hi
Both will serve the purpose i think.But generally,DDL statements like create,alter,drop are used with execute() and DML statements like insert,update and etc are used with exeuteUpdate() method.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: create table.. which method?