Home » SQL & PL/SQL » SQL & PL/SQL » Create Table As Select (Oracle 9i)
Create Table As Select [message #340823] Thu, 14 August 2008 08:59 Go to next message
Messages: 36
Registered: June 2008
Location: CA
Here I have scenario where I have to create a table
using two tables.

Here I need just the structure not the data.
I know with one table

Create  table temp_test1 as
     Select * from Tablea where 1 = 2

But for more than two tables, how to mention the condition such that only the structure prevails not the data.

Create table temp_test as 
       Select a.col1,a.col2,a.col3,b.col4 
         From Table a, Tableb b
         Where (condition?)

Re: Create Table As Select [message #340828 is a reply to message #340823] Thu, 14 August 2008 09:12 Go to previous message
Michel Cadot
Messages: 65150
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Same thing, just try it.

Previous Topic: ORA-01445: cannot select ROWID from, or sample, a join view without a key-preserved table
Next Topic: Date Calculation with Oracle
Goto Forum:

Current Time: Tue Aug 22 00:35:03 CDT 2017

Total time taken to generate the page: 0.18108 seconds