# Temporary Table RDBMS in Dremio

**URL:** https://community.dremio.com/t/temporary-table-rdbms-in-dremio/6831
**Category:** Uncategorized
**Created:** [January 11, 2021, 9:04pm UTC](https://community.dremio.com/t/temporary-table-rdbms-in-dremio/6831 "2021-01-11T21:04:11Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![ashokojha](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@ashokojha](https://community.dremio.com/u/ashokojha)
#### Post date: [January 11, 2021, 9:04pm UTC](https://community.dremio.com/t/temporary-table-rdbms-in-dremio/6831/1 "2021-01-11T21:04:11Z")

</div>

This is my day 1 in Dremio. My background is mostly working in traditional RDBMS. I did complete Dremio Fundamental training today. I have a few quick answers to find out so looking for help. I have VDS in my Dremio database.

1. Is there a temporary table or #table in Dremio. For example, in sql databases we can create  
SELECT C1, C2 INTO #TEMP\_TBL FROM MYTABLE  
SELECT \* FROM #TEMP\_TBL  
How can I do the same in Dremio

2. How can write SQL block of Dremio? For example, in sql databases we can write  
Declare  
@today date  
Begin  
set @today = sysdate()  
End

Basically is there any document which talks about RDBMS to Dremio transition?

Thanks - Ashok

---

<div class="post-metadata">

### Author: ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)
#### Post date: [January 12, 2021, 8:51am UTC](https://community.dremio.com/t/temporary-table-rdbms-in-dremio/6831/2 "2021-01-12T08:51:02Z")

</div>

@ashokojha

Dremio does not write back anything to RDBMS. The only place Dremio can write back is on to a data lake like S3 in Parquet file format. Currently you can write an equivalent of PL/SQL o SQL block in Dremio

In other words you can query SQL server via Dremio and also create reflections so the data is written back in Parquet

Thanks  
Bali

---

<div class="post-metadata">

### Author: ![ashokojha](https://avatars.discourse-cdn.com/v4/letter/a/6f9a4e/32.png) [@ashokojha](https://community.dremio.com/u/ashokojha)
#### Post date: [January 13, 2021, 3:41pm UTC](https://community.dremio.com/t/temporary-table-rdbms-in-dremio/6831/3 "2021-01-13T15:41:25Z")

</div>

Hi Bali,

Thanks for your reply.

If I understand correctly the rdbms type Temp table alternate I have in Dremio to write to “S3 in Parquet format” and I should explore - reflections.

About your note “Currently you can write an equivalent of PL/SQL o SQL block in Dremio” - can you please point me to some sample code or case study or examples.

Thanks - Ashok

---

<div class="post-metadata">

### Author: ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)
#### Post date: [January 14, 2021, 7:53am UTC](https://community.dremio.com/t/temporary-table-rdbms-in-dremio/6831/4 "2021-01-14T07:53:43Z")

</div>

@ashokojha

Sorry, that was a typo, we currently cannot

Thanks  
Bali

---

<div class="post-metadata">

### Author: ![ericathm](https://avatars.discourse-cdn.com/v4/letter/e/0ea827/32.png) [@ericathm](https://community.dremio.com/u/ericathm)
#### Post date: [April 10, 2023, 5:39pm UTC](https://community.dremio.com/t/temporary-table-rdbms-in-dremio/6831/5 "2023-04-10T17:39:35Z")

</div>

Hi there, so… it’s not possible yet to create an Temporary table on Dremio?

For example: select \* into #temp from table  
or create table #temp as select \* from table

what is our options? thanks

---

<div class="post-metadata">

### Author: ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)
#### Post date: [April 11, 2023, 3:56pm UTC](https://community.dremio.com/t/temporary-table-rdbms-in-dremio/6831/6 "2023-04-11T15:56:35Z")

</div>

@ericathm Dremio does support CTAS but those are permanent tables and will not be dropped on restart, you have to manually drop them using the DROP TABLE command, but certainly can be used like temp tables

You can CTAS either as PARQUET or ICEBERG
