开发者

How to run (execute) .sql file in SQL Server 2005? [closed]

开发者 https://www.devze.com 2023-04-12 20:04 出处:网络
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 11 years ago.

I have a Orders_SPs.sql file.

Its purpose is to add a new stored开发者_JS百科 procedure inside my existing Northwind database which is running on SQL Server 2005 and I also have SQL Server Management Studio.

But I don’t know how to execute that .sql file so it can add list of stored procedures in my existing northwind database from Orders_SPs.sql file.

Thanks….


  1. Launch SQL Server Management Studio
  2. Make sure you're in the right database
  3. Choose from menu: File > Open > File
  4. Find and select your orders_sps.sql file
  5. From the menu, choose Query > Execute (or press F5)


Open the file in SQL Server Management Studio and hit F5.


Open Sql Server Management Studio. Once opened, open your .sql file by clicking File-->Open.

Select the NorthWind from the Database list that appears on the tool bar. Now press F5.

It will run the SQL statements on your .sql file and create the stored procs.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号