SQL script to “copy” a database

后端 未结 7 576
名媛妹妹
名媛妹妹 2020-12-14 20:46

I want to write a SQL script that will copy a database on the same server. I could do a backup/restore, but I think it might be faster to just \"copy\" somehow. Does anyon

7条回答
  •  时光说笑
    2020-12-14 21:22

    I'm not sure, but I think you are looking for this:

    BACKUP DATABASE MyDB TO DISK='D:\MyDB.bak'
    

提交回复
热议问题