Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2003
    Location
    Mars
    Posts
    115

    Unanswered: creating a duplicate table Urgent

    Hi All,

    I want to create duplicate of a table that is present in database with new name. How can i do it.
    I am fogeting the syntax

    is it
    insert into newtablename from oldtable name


    Regards
    Adil

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    SELECT * INTO NewTable 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
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Remember that your new table will not have any indexes, triggers, constraints, etc that your original table had. It is a duplicate in content only.

    blindman

  4. #4
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Originally posted by blindman
    will not have any indexes, triggers, constraints, etc
    blindman
    What are those?
    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.

  5. #5
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Ask Sundial. He'll tell you that they aren't really necessary and you can generally ignore them.

    blindman

  6. #6
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401
    And even if you have them in your database, they are self maintaining ... no need to run dbcc's on the database
    Get yourself a copy of the The Holy Book

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

Posting Permissions

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