Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

create table based on a select statement

Status
Not open for further replies.

mbl73

Programmer
Mar 28, 2007
9
TT
Is it possible to use multiple tables in the select statement when creating tables?
 
Yes, did you try it?
Code:
CREATE TABLE mytable AS
(SELECT d1.dummy, SYSDATE my_date, 
        d2.dummy extra_col
 FROM dual d1, 
      dual d2);

SELECT * FROM mytable;

DUMMY   MY_DATE                 EXTRA_COL
X       03/29/2007 10:16:27 AM  X

[sup]Beware of false knowledge; it is more dangerous than ignorance.[/sup][sup] ~George Bernard Shaw[/sup]
Consultant Developer/Analyst Oracle, Forms, Reports & PL/SQL (Windows)
My website: www.EmuProductsPlus.com
 
I am new to oracle so my questions may seem very basic.
I did try it but used GLOBAL TEMPORARY TABLE instead, should that matter?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top