sql to copy data from table 1 to table 2 in sep databases

Posted on 2010-01-08
Last Modified: 2012-05-08
Is there a way to create a script to copy data from database1 to database2  from table1 in database1 to table2 in database2 ?   The tables have the exact same structure, I am basically moving them from one DB to another, once they are copied Ill later on delete them from the first database.
Question by:amucinobluedot
    LVL 60

    Accepted Solution

    insert into database1.dbo.table1(fieldlist)
    select fieldlist
    from database2.dbo.table1

    Author Comment

    Thanks, Ill give it a shot in a little bit.

    Featured Post

    PRTG Network Monitor: Intuitive Network Monitoring

    Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

    Join & Write a Comment

    Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
    This article describes some very basic things about SQL Server filegroups.
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now