Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to truncate table?

 
Mindy Wu
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to truncate the table before inserting new record into my table, can anyone tell me the syntax?
Is this right?
Statement stTruncate = con.createStatement();
stTruncate.executeUpdate("truncate table tblName");
???
Thanks!
 
Mindy Wu
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never mind, i did it. The above code is right!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic