inquiry

I just have a basic inquiry about sql server mngt studio.

I have create about 50 tables under the Master database. i no longer want them there and would like to place all 50 of my tables into another database. The only way I can seem to go about doing it, is to go into the code and change "Use [Master]" to "Use [Quickwire]", where quickwire is my new database name. however, since there are so many tables this is a very tedious process. Is there an easier way...like a copy and paste concept

Please let me know if there is..



Answer this question

inquiry

  • RajDas

    You can copy these tables by using DTS:Copy SQL Server Objects Task. Select the tables that you want to copy in tab Copy.


  • Marzk

    you can use

    the "select into" statement with the 3 part naming convention

    use master
    select * into quickwire.dbo.dummy from dummy -- 3 part naming convention (server.owner.table)
    drop table dummy

    creates a new table at qucikwire named dummy

    and drops dummy from master



  • inquiry