How to create a table similar to the output of a query?



IBM's flagship relational database management system

How to create a table similar to the output of a query?

Postby nitinsharma_1212 » Tue Apr 08, 2008 6:50 am

Hi All

How we can create a table similar to the output of query?

Suppose we want to create a table TAB1
and I have a query like

Select * from Table2

Can I write a query like

CREATE TABLE TAB1 AS
SELECT *
FROM Table2
nitinsharma_1212
 
Posts: 1
Joined: Tue Apr 08, 2008 6:20 am
Has thanked: 0 time
Been thanked: 0 time

Re: How to create a table similar to the output of a query?

Postby dick scherrer » Tue Apr 08, 2008 8:38 am

Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post