Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2004
    Location
    Mumbai, India
    Posts
    15

    Question Unanswered: query for copying table

    Hi,
    I wanted to know a query in sql that would copy a whole table from one database to another database with both the structure and the content.
    strangely, my college professor don't know the same.
    I tried looking in the help menu in sql but it didn't helping me much.
    Help me out...!! I have a deadline to meet. I really would appreciate it. thanxs. --vijay.

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    You could use DTS, or the
    Code:
    SELECT *
       INTO newTable
       FROM otherdatabase.owner.oldTable
    syntax to copy your table from one database to another.

    -PatP

  3. #3
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Books online is the first hand help you can get for any such syntax and information.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  4. #4
    Join Date
    Mar 2004
    Location
    Mumbai, India
    Posts
    15

    Thanx for the query

    Thank you very much. The query worked. Now i will get back to work and finish it off. I didn't understand about the DTS. but anyways the query was enuf.

  5. #5
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Refer to books online about DTS.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

Posting Permissions

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