If you are truncated using JDBC, How can you know ..that how much data is truncated ?
posted 12 years ago
Depending on which DB you are using, I know that in Oracle when you issue the truncate command you remove all of the table entries. I suppose that you could get a count before issuing the truncate command and then you would know how many have been removed. I hope this helps!!
We make a living by what we get, we make a life by what we give!
giridhar, you can issue a delete statement instead. "DELETE FROM table WHERE 1 = 0". This statement will clear your table ( although probably not as efficiently as a truncate ) and the executeUpdate() method will return the number of rows effected ( deleted ). Jamie