+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Does DB2 support 'CREATE TABLE tmp SELECT * FROM EMP' ?

  1. Does DB2 support 'CREATE TABLE tmp SELECT * FROM EMP' ?

    Hi,

    is it possible to create tables using SELECT in DB2?


    Zsolt



  2. Re: Does DB2 support 'CREATE TABLE tmp SELECT * FROM EMP' ?

    "Zsolt Koppany" wrote in message
    news:bm8ccp$oot$04$1@news.t-online.com...
    > Hi,
    >
    > is it possible to create tables using SELECT in DB2?
    >
    >
    > Zsolt
    >
    >

    Yes, using the CREATE TABLE AS syntax. These are Materialized Query Tables,
    unless the DEFINITION ONLY option is specified, in which case the table is
    created without any data.

    You can also use CREATE TABLE LIKE... if the new table is exactly like the
    old table.

    See the SQL Reference Vol 2 manual (version 7 only has one volume).



  3. Re: Does DB2 support 'CREATE TABLE tmp SELECT * FROM EMP' ?

    "Zsolt Koppany" wrote in message
    news:bm8ccp$oot$04$1@news.t-online.com...
    > Hi,
    >
    > is it possible to create tables using SELECT in DB2?
    >
    >
    > Zsolt
    >
    >

    Yes, using the CREATE TABLE AS syntax. These are Materialized Query Tables,
    unless the DEFINITION ONLY option is specified, in which case the table is
    created without any data.

    You can also use CREATE TABLE LIKE... if the new table is exactly like the
    old table.

    See the SQL Reference Vol 2 manual (version 7 only has one volume).



  4. Re: Does DB2 support 'CREATE TABLE tmp SELECT * FROM EMP' ?

    "Zsolt Koppany" wrote in message
    news:bm8ccp$oot$04$1@news.t-online.com...
    > Hi,
    >
    > is it possible to create tables using SELECT in DB2?
    >
    >
    > Zsolt
    >
    >

    Yes, using the CREATE TABLE AS syntax. These are Materialized Query Tables,
    unless the DEFINITION ONLY option is specified, in which case the table is
    created without any data.

    You can also use CREATE TABLE LIKE... if the new table is exactly like the
    old table.

    See the SQL Reference Vol 2 manual (version 7 only has one volume).



  5. Re: Does DB2 support 'CREATE TABLE tmp SELECT * FROM EMP' ?

    Note that if you use CREATE TABLE LIKE, you need a separate step to
    populate it. You can do it in one step from the Control Center.

    CREATE TABLE ADDRESS2 LIKE ADDRESS

    INSERT INTO ADDRESS2 SELECT * FROM ADDRESS


    Mark A wrote:

    > "Zsolt Koppany" wrote in message
    > news:bm8ccp$oot$04$1@news.t-online.com...
    >
    >>Hi,
    >>
    >>is it possible to create tables using SELECT in DB2?
    >>
    >>
    >>Zsolt
    >>
    >>

    >
    > Yes, using the CREATE TABLE AS syntax. These are Materialized Query Tables,
    > unless the DEFINITION ONLY option is specified, in which case the table is
    > created without any data.
    >
    > You can also use CREATE TABLE LIKE... if the new table is exactly like the
    > old table.
    >
    > See the SQL Reference Vol 2 manual (version 7 only has one volume).
    >
    >



  6. Re: Does DB2 support 'CREATE TABLE tmp SELECT * FROM EMP' ?

    Note that if you use CREATE TABLE LIKE, you need a separate step to
    populate it. You can do it in one step from the Control Center.

    CREATE TABLE ADDRESS2 LIKE ADDRESS

    INSERT INTO ADDRESS2 SELECT * FROM ADDRESS


    Mark A wrote:

    > "Zsolt Koppany" wrote in message
    > news:bm8ccp$oot$04$1@news.t-online.com...
    >
    >>Hi,
    >>
    >>is it possible to create tables using SELECT in DB2?
    >>
    >>
    >>Zsolt
    >>
    >>

    >
    > Yes, using the CREATE TABLE AS syntax. These are Materialized Query Tables,
    > unless the DEFINITION ONLY option is specified, in which case the table is
    > created without any data.
    >
    > You can also use CREATE TABLE LIKE... if the new table is exactly like the
    > old table.
    >
    > See the SQL Reference Vol 2 manual (version 7 only has one volume).
    >
    >



  7. Re: Does DB2 support 'CREATE TABLE tmp SELECT * FROM EMP' ?

    Note that if you use CREATE TABLE LIKE, you need a separate step to
    populate it. You can do it in one step from the Control Center.

    CREATE TABLE ADDRESS2 LIKE ADDRESS

    INSERT INTO ADDRESS2 SELECT * FROM ADDRESS


    Mark A wrote:

    > "Zsolt Koppany" wrote in message
    > news:bm8ccp$oot$04$1@news.t-online.com...
    >
    >>Hi,
    >>
    >>is it possible to create tables using SELECT in DB2?
    >>
    >>
    >>Zsolt
    >>
    >>

    >
    > Yes, using the CREATE TABLE AS syntax. These are Materialized Query Tables,
    > unless the DEFINITION ONLY option is specified, in which case the table is
    > created without any data.
    >
    > You can also use CREATE TABLE LIKE... if the new table is exactly like the
    > old table.
    >
    > See the SQL Reference Vol 2 manual (version 7 only has one volume).
    >
    >



  8. Re: Does DB2 support 'CREATE TABLE tmp SELECT * FROM EMP' ?

    If only that would work for temporary tables, ala:

    CREATE TEMP TABLE ADDRESS2 LIKE ADDRESS

    aj

    On Sat, 11 Oct 2003 12:44:42 -0400, Blair Adamache
    wrote:

    >Note that if you use CREATE TABLE LIKE, you need a separate step to
    >populate it. You can do it in one step from the Control Center.
    >
    > CREATE TABLE ADDRESS2 LIKE ADDRESS
    >
    > INSERT INTO ADDRESS2 SELECT * FROM ADDRESS
    >
    >
    >Mark A wrote:
    >
    >> "Zsolt Koppany" wrote in message
    >> news:bm8ccp$oot$04$1@news.t-online.com...
    >>
    >>>Hi,
    >>>
    >>>is it possible to create tables using SELECT in DB2?
    >>>
    >>>
    >>>Zsolt
    >>>
    >>>

    >>
    >> Yes, using the CREATE TABLE AS syntax. These are Materialized Query Tables,
    >> unless the DEFINITION ONLY option is specified, in which case the table is
    >> created without any data.
    >>
    >> You can also use CREATE TABLE LIKE... if the new table is exactly like the
    >> old table.
    >>
    >> See the SQL Reference Vol 2 manual (version 7 only has one volume).
    >>
    >>

    >



  9. Re: Does DB2 support 'CREATE TABLE tmp SELECT * FROM EMP' ?

    If only that would work for temporary tables, ala:

    CREATE TEMP TABLE ADDRESS2 LIKE ADDRESS

    aj

    On Sat, 11 Oct 2003 12:44:42 -0400, Blair Adamache
    wrote:

    >Note that if you use CREATE TABLE LIKE, you need a separate step to
    >populate it. You can do it in one step from the Control Center.
    >
    > CREATE TABLE ADDRESS2 LIKE ADDRESS
    >
    > INSERT INTO ADDRESS2 SELECT * FROM ADDRESS
    >
    >
    >Mark A wrote:
    >
    >> "Zsolt Koppany" wrote in message
    >> news:bm8ccp$oot$04$1@news.t-online.com...
    >>
    >>>Hi,
    >>>
    >>>is it possible to create tables using SELECT in DB2?
    >>>
    >>>
    >>>Zsolt
    >>>
    >>>

    >>
    >> Yes, using the CREATE TABLE AS syntax. These are Materialized Query Tables,
    >> unless the DEFINITION ONLY option is specified, in which case the table is
    >> created without any data.
    >>
    >> You can also use CREATE TABLE LIKE... if the new table is exactly like the
    >> old table.
    >>
    >> See the SQL Reference Vol 2 manual (version 7 only has one volume).
    >>
    >>

    >



  10. Re: Does DB2 support 'CREATE TABLE tmp SELECT * FROM EMP' ?

    If only that would work for temporary tables, ala:

    CREATE TEMP TABLE ADDRESS2 LIKE ADDRESS

    aj

    On Sat, 11 Oct 2003 12:44:42 -0400, Blair Adamache
    wrote:

    >Note that if you use CREATE TABLE LIKE, you need a separate step to
    >populate it. You can do it in one step from the Control Center.
    >
    > CREATE TABLE ADDRESS2 LIKE ADDRESS
    >
    > INSERT INTO ADDRESS2 SELECT * FROM ADDRESS
    >
    >
    >Mark A wrote:
    >
    >> "Zsolt Koppany" wrote in message
    >> news:bm8ccp$oot$04$1@news.t-online.com...
    >>
    >>>Hi,
    >>>
    >>>is it possible to create tables using SELECT in DB2?
    >>>
    >>>
    >>>Zsolt
    >>>
    >>>

    >>
    >> Yes, using the CREATE TABLE AS syntax. These are Materialized Query Tables,
    >> unless the DEFINITION ONLY option is specified, in which case the table is
    >> created without any data.
    >>
    >> You can also use CREATE TABLE LIKE... if the new table is exactly like the
    >> old table.
    >>
    >> See the SQL Reference Vol 2 manual (version 7 only has one volume).
    >>
    >>

    >



+ Reply to Thread
Page 1 of 2 1 2 LastLast