# Temporary table

**URL:** <https://forum.golangbridge.org/t/temporary-table/27549>\
**Category:** Technical Discussion\
**Created:** [May 26, 2022, 6:36am UTC](https://forum.golangbridge.org/t/temporary-table/27549 "2022-05-26T06:36:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![packs](https://forum.golangbridge.org/user_avatar/forum.golangbridge.org/packs/32/9635_2.png) [@packs](https://forum.golangbridge.org/u/packs)\
**Post date:** [May 26, 2022, 6:36am UTC](https://forum.golangbridge.org/t/temporary-table/27549/1 "2022-05-26T06:36:08Z")

</div>

I have created store procedure in MySQL. Inside store procedure I am using temporary table.

This temporary table is not get created.

If I change to permanent table it is working.

---

<div class="post-metadata">

**Author:** ![s0xzwasd](https://forum.golangbridge.org/letter_avatar_proxy/v4/letter/s/e8c25b/32.png) [@s0xzwasd](https://forum.golangbridge.org/u/s0xzwasd)\
**Post date:** [May 26, 2022, 8:08am UTC](https://forum.golangbridge.org/t/temporary-table/27549/2 "2022-05-26T08:08:31Z")

</div>

Please share more details: an example of a procedure, Go code snippet.

---

<div class="post-metadata">

**Author:** ![Massimo.Costa](https://forum.golangbridge.org/user_avatar/forum.golangbridge.org/massimo.costa/32/9802_2.png) [@Massimo.Costa](https://forum.golangbridge.org/u/Massimo.Costa)\
**Post date:** [May 27, 2022, 8:36am UTC](https://forum.golangbridge.org/t/temporary-table/27549/3 "2022-05-27T08:36:30Z")

</div>

is this Go related?

what do you tried so far?

---

<div class="post-metadata">

**Author:** ![Yamil\_Bracho](https://forum.golangbridge.org/user_avatar/forum.golangbridge.org/yamil_bracho/32/5141_2.png) [@Yamil\_Bracho](https://forum.golangbridge.org/u/Yamil_Bracho)\
**Post date:** [May 28, 2022, 1:24am UTC](https://forum.golangbridge.org/t/temporary-table/27549/4 "2022-05-28T01:24:42Z")

</div>

If you are creating your temporary table in a stored procedure, that table does not persist after the SP ends

---

<div class="post-metadata">

**Author:** ![packs](https://forum.golangbridge.org/user_avatar/forum.golangbridge.org/packs/32/9635_2.png) [@packs](https://forum.golangbridge.org/u/packs)\
**Post date:** [May 28, 2022, 5:14am UTC](https://forum.golangbridge.org/t/temporary-table/27549/5 "2022-05-28T05:14:44Z")

</div>

According to me, I am using transactions in golang and the stored procedure is executed within the transaction .

It should be available .

---

<div class="post-metadata">

**Author:** ![vitr](https://forum.golangbridge.org/user_avatar/forum.golangbridge.org/vitr/32/3918_2.png) [@vitr](https://forum.golangbridge.org/u/vitr)\
**Post date:** [May 28, 2022, 10:11am UTC](https://forum.golangbridge.org/t/temporary-table/27549/6 "2022-05-28T10:11:12Z")

</div>

doesn’t seem go related, but have a read here [MySQL :: Temporary tables are now allowed in transactions when GTIDs are enabled](https://dev.mysql.com/blog-archive/temporary-tables-are-now-allowed-in-transactions-when-gtids-are-enabled/#:~:text=Contact%20MySQL%20%7C&text=The%20limit%20is%20that%20temporary,an%20inconsistent%20replication%20data%20flow).

---

<div class="post-metadata">

**Author:** ![system](https://forum.golangbridge.org/uploads/default/original/2X/5/5ad234f7c3dbc68b6cc72d338ce4f2973d9fd81c.png) [@system](https://forum.golangbridge.org/u/system)\
**Post date:** [August 26, 2022, 10:11am UTC](https://forum.golangbridge.org/t/temporary-table/27549/7 "2022-08-26T10:11:22Z")

</div>

Closed on August 26, 2022, 10:11am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
