How to import .sql file into SQL Server Express

后端 未结 5 2182
野趣味
野趣味 2020-12-29 15:07

I have a plain sql file with some SQL INSERT statements.

Is it possible to import it in my local SQL Server Express instance?

5条回答
  •  感动是毒
    2020-12-29 15:47

    You can use Management Studio Express edition. You can download the latest version here - which will work against SQL Express 2005, 2008 and 2008 R2.

    If you don't want to install SSMSE then you can use sqlcmd at a command prompt, e.g. something like this (assuming Windows auth and an instance called "SQLEXPRESS"):

    sqlcmd -S .\SQLEXPRESS -E -i "C:\path\file.sql"
    

提交回复
热议问题