create temp table and import

  • Hi,

    We want to create a table(tbl_a) which will import all the data from other similar table(tbl_b) such that:

    creat table tbl_a

    (

    col_1,

    col_2

    )

    go

    insert

    into

    tbl_a

    (

    col_1,

    col_2

    )

    select

    col_1,

    col_2

    from

    tbl_b

    go

    Any single SQL statement that can combine the above 2 sql into 1 sql? Thanks a lot.

    Best regards,

    Wallace

  • Chan Wai Yin (1/8/2010)


    Any single SQL statement that can combine the above 2 sql into 1 sql?

    Hi,

    Instead of creating table tbl_a, you get directly from

    select col1,col2 into tbl_a from tbl_b

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply