Results 1 to 6 of 6

Thread: Create Table

  1. #1
    Join Date
    Aug 2003
    Posts
    328

    Unanswered: Create Table

    Can I create a table from another table? If so how. In Oracle the syntax is:
    Create table new_table as select * from table
    Thanks

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    SELECT * INTONewTable FROM OldTable
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Aug 2003
    Posts
    328
    I thought it was that easy. Thanks.

  4. #4
    Join Date
    Oct 2001
    Location
    Naples, FL
    Posts
    273
    And if you only want the structure, not the data

    select * into newtable from oldtable where 0=1

    HTH
    ---------------
    Ray Higdon MCSE, MCDBA, CCNA

  5. #5
    Join Date
    Dec 2003
    Posts
    31
    be aware thet using "select * into new table From Table" will create the same structure without indexes defaults and identity fields

  6. #6
    Join Date
    Aug 2003
    Posts
    328
    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •