Why I'm not able to roll back the truncate statement via rollback statment????
I guess we can't roll back truncate statement same as drop
one more thing You guys forgot to use truncate statement and didn't even shows up truncate command to be executed
"TRUNCATE TABLE table_name"
As per the MySQL documentation, TRUNCATE works by DROPping the table and re-creating it as blank, which is apparently faster than deleting rows one by one. Then, it causes an implicit commit, thus it cannot rolled back.
Hi Mayank and Carl!
Thanks for reaching out.
Thanks for sharing this piece of information with the Community!
Carl said it all.
TRUNCATE works by droping the table and re-creating it as blank and cannot be rolled back.
Hope this helps.