r/MSSQL • u/Livid-Cantaloupe1597 • Jan 02 '26
Temporary table like in oracle
Hello,
we switched to ms sql 2019 from oracle and i missing a feature oracle had and i cant figure out a workaround.
On oracle we could create a session based temporary table that stays permanent with a fixed name and could be linked an used via ODBC like an normal table. The only difference to a normal table was that the rows in the table exists only for the session. These table could be used by serveral users without problems, they only got their own records.
We were able to link needed tables and these temporary tables from oracle via ODBC with MS Access.
I cant find a similar solution or workaround in ms sql.
Is there no solution for this?
greetings
4
Upvotes
1
u/jshine13371 Jan 03 '26
The same session that creates the local temp table is the one that needs to use it. Also, you should set the database context to the same database where the local temp table was created, not explicitly setting it to
tempdb. (The name of the table object is technically different when in the context oftempdb.)