Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2004
    Posts
    4

    Unanswered: SQL7 Table Copy DB1 to DB2 Same Server

    Can you please advise on how to copy tables from DB1 to DB2 on the same SQL 7 Server. The programer had me drop the tables from DB2 and wants me to copy the tables from DB1 to DB2.

    Thanks for any help.

  2. #2
    Join Date
    Jan 2004
    Posts
    10
    /* if you have not created target table */
    select * into DB1.OWNER.TABLENAME
    from DB2.OWNER.TABLENAME

    or

    /* if you have already created target table */
    insert DB1.OWNER.TABLENAME
    select * from DB2.OWNER.TABLENAME

  3. #3
    Join Date
    Dec 2003
    Posts
    31
    be aware thar
    Select * into DB2..<table Name>
    from DB1..<Tablename>

    creates copy of table without indexes, PK identity columns triggers..

  4. #4
    Join Date
    May 2003
    Location
    Athens Greece
    Posts
    13

    Arrow

    Just use a DTS task to copy the table with its respective indexes, it'll do the trick

  5. #5
    Join Date
    Jan 2004
    Posts
    4

    Thanks - DTS

    Thanks for the referal to DTS. I was able to review the documentation and perform the copy.

Posting Permissions

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