SQL CREATE TABLE Create a Temporary or In-Memory Table

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Example

PostgreSQL and SQLite

To create a temporary table local to the session:

CREATE TEMP TABLE MyTable(...);

SQL Server

To create a temporary table local to the session:

CREATE TABLE #TempPhysical(...);

To create a temporary table visible to everyone:

CREATE TABLE ##TempPhysicalVisibleToEveryone(...);

To create an in-memory table:

DECLARE @TempMemory TABLE(...);


Got any SQL Question?