MySQL:- Temporary Tables

Background Was reading through some documentation and it touched on temporary tables in MySQL. Sample Here is a sample code. Outline Create database\schema if it does not exist Begin new transaction using start transaction Create temporary table ( accountTransaction ) create temporary table ( accountBalance ) Add data into temporary table ( accountTransaction ) Summary … Continue reading MySQL:- Temporary Tables

MySQL – Temporary Table & Common Table Expression ( CTE ) – Error – “Can’t reopen table” ( Error 1137 )

Background There is a small error that one can run into when using Temporary Tables and Common Table Expression ( CTE ). Error Error - Can't reopen table Error Image Error Text Scenario Common Table Expression SQL Result ¬† Temporary Table & Common Table Expression Query:- Successful SQL Result Query - Failed SQL Output Output … Continue reading MySQL – Temporary Table & Common Table Expression ( CTE ) – Error – “Can’t reopen table” ( Error 1137 )