HiAnybody please explain volatile Table in teradata.Bcoz i have a couple of questions about for the same.
Hello,Volatile Tables - VT Tables, are temporary tables which are created and populated/materialized under user's space. If not dropped explicitly, they are dropped when the session has ended!HTH!Regards,Adeel
-- If you are stuck at something .... consider it an opportunity to think anew.
Hi adeelFor example, suppose you log on two sessions, Session 1 and Session 2. Assume the defaultdatabase name is your login user name. Consider the following scenario.Create a permanenttable with an unqualifiedtable name of VT2.Session 1 creates a permanent tablenamed VT2 using your login user nameas the database.Create a volatiletable named VT2.Session 2 receives a CREATE TABLEerror, because there is already apermanent table with that name.Create a volatile tablenamed VT3.Session 1 creates a volatile table namedVT3 using your login user name as thedatabase.Create a permanenttable with anunqualified tablename of VT3.Session 2 creates a permanent tablenamed VT3 using your login user nameas the database.Because a volatile table is known onlyto the session that creates it, apermanent table with the same name asthe volatile table VT3 in Session 1 canbe created as a permanent table inSession 2.Please explain me clearly am not able understand above exaples
Let me rephrase what you described as follows:Suppose following:CT = Create TableCVT = Create Volatile TableT* = TimeT1: Session1 => CT => VT2 - DoneT2: Session1 => CVT => VT2 - ErrorT3: Session1 => CVT => VT3 - DoneT4: Session2 => CT => VT3 - DoneNow, what exactly is your question? 'Why it allowed last statement?', The answer is, because regardless of what the user was, in that session (Session2), there is no table named VT3, so it was allowed!HTH!Regards,Adeel
Hithanksobjects are created in user space right
Not all objects, but Volatile tables!Regards,Adeel
I hope that top metion question is like below.......
T1: Session1 => CT => VT2 - Done
T2: Session2 => CVT => VT2 - Error
T3: Session1 => CVT => VT3 - Done
T4: Session2 => CT => VT3 - Done
Why its giveing the error at T2 ???
can u please clarify it ???