Global Temp Tables - SQL Server vs Oracle

后端 未结 4 1530
离开以前
离开以前 2021-01-13 08:22

I am using Oracle 11g Global Temporary Tables as I need a solution where I can add rows to a temporary table for a join, and I want only the rows added to the temp table for

4条回答
  •  半阙折子戏
    2021-01-13 09:01

    If you manually create tables in the tempdb database, you acheive more or less the same effect:

    USE tempdb;
    
    CREATE TABLE foo...
    

    and then address them:

    select * from tempdb..foo
    

    These tables will not be deleted between sessions. You need to manually truncate them though, no equivalent of ON COMMIT DELETE ROWS.

提交回复
热议问题