如何将.sql文件导入SQL Server Express [英] How to import .sql file into SQL Server Express
本文介绍了如何将.sql文件导入SQL Server Express的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个带有某些SQL INSERT语句的普通sql文件.
I have a plain sql file with some SQL INSERT statements.
是否可以将其导入我的本地SQL Server Express实例中?
Is it possible to import it in my local SQL Server Express instance?
推荐答案
您可以使用Management Studio Express版本.您可以在此处下载最新版本-该版本可与SQL Express配合使用2005、2008和2008 R2.
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.
如果您不想安装SSMSE,则可以在命令提示符下使用sqlcmd,例如像这样(假设Windows身份验证和一个名为"SQLEXPRESS"的实例):
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"
这篇关于如何将.sql文件导入SQL Server Express的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文