Win a copy of Getting started with Java programming language this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

create table.. which method?  RSS feed

 
tormod eriksen
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 220
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!