I am a newbie in Teradata and trying to know the basic concepts. I was able to understand the basic difference between Volatile table and GTT
Volatile table - exists only during the session and table structure and row contents deletes after the session
GTT - the table contents exists only during the session and table structure retains unless dropped manually/ command (as table structure gets copied to DD).
but my question is, what would be the difference between both these tables if both are used with the ON COMMIT PRESERVE ROWS statement.
thanks in advance!
They are similar in many features. You can create and see both how they are implemented. This link highlights a comparison:
There are scenarios where we need to use GTT , VTT to optimize the systems or applications.
In the context ON COMMIT PRESERVE ROWS, it is the same for both, saving contents.