Sample Header Ad - 728x90

Similar to how there exists a volatile table in Teradata SQL, how can I create a volatile table or something similar in Azure?

0 votes
1 answer
712 views
Seen below is the code of how I would create a volatile table when I was coding in Teradata. I liked it because it would be the same structure and format as a normal query, but it would make a temporary table. More specifically, I like how I do not have to specify every single column and data type. I am trying to figure out how to make a similar temporary table in Azure Data Studio without having to define all of my columns. I do not have too much SQL experience and my skills are relatively basic, so any help is appreciated. Thanks! ``` drop table #t_table; create volatile table #t_table as ( SELECT patient.ID, patient.age, patient.sex, ICD.PrimaryICDCode FROM QP.patient LEFT JOIN QP.ICD ON ICD.ID = patient.ID WHERE patient.age > 30 ) with data on commit preserve rows;
Asked by agentneru (1 rep)
Feb 15, 2023, 09:50 PM
Last activity: Jul 30, 2025, 02:02 AM