aspose file tools
The moose likes Beginning Java and the fly likes how to truncate table? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "how to truncate table?" Watch "how to truncate table?" New topic
Author

how to truncate table?

Mindy Wu
Ranch Hand

Joined: Jan 12, 2001
Posts: 121
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

Joined: Jan 12, 2001
Posts: 121
Never mind, i did it. The above code is right!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to truncate table?
 
Similar Threads
deleting records in smaller chunks and issuing commit?
Java DB - Delete all records in a table.
commit command
Problem with AUTO_INCREMENT index reset when DB restarts
Emptying a table but only by deleting a specified number of rows at a time