How to use sqlcmd to create a database

后端 未结 5 1626
刺人心
刺人心 2020-12-31 05:31

I have a .sql script and I want to build a database from it. How to do it in sqlcmd? I know it\'s like:

CREATE DATABASE dbName
GO

But how t

5条回答
  •  有刺的猬
    2020-12-31 06:11

    use this: sqlcmd -i "c:\my scripts\my script.sql"

    see sqlcmd description at MS for other options

提交回复
热议问题