Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

temp table with the structure of another table

frenchcancanJan 16 2019 — edited Jan 22 2019

Hello!

is it possible to create a local temporary table with the structure of another table?

Without specifying each column,

Not like that:

CREATE TABLE #tempSessionC 

  Column1  INT   NOT NULL
  Column2  NVARCHAR(4000
);

But something like

CREATE TABLE #tempSessionC  otherTable%type

Thanks in advance for your help

frenchcancan

Comments
Post Details
Added on Jan 16 2019
7 comments
1,164 views