Modifying a stored procedure in SQL Server 2005

Source: Internet
Author: User
Tags modify sql save file window management studio sql server management sql server management studio
When the server| stored procedure first used SQL Server 2005, it did not know how to save it after modifying the stored procedure.

I found the appropriate stored procedure in the SQL Server Management Studio progammability, right click and select "Modify", will open the edit window, I modify and click Save, but the "Save File as" dialog box, Let me choose the saved path and filename, which is saved as another file instead of saving the modified stored procedure directly. I do not know why to design this way, I think the General people just start to use like me to operate. I also found no other way to operate in SQL Server Management Studio. That's depressing!

Later on the internet found an article "Saving Stored Procedure" to know how to save the modified stored procedures, it is by clicking the "Execute" button (or press the F5 key). I thought this operation was directly executing the stored procedure. I later discovered that when the edit window was opened through "Modify", the "ALTER" keyword was added before the stored procedure, so when the stored procedure was actually modified through the "execute" stored procedures, the SQL statements in the stored procedure were not executed. This reminds me of VS 2003 and VS 2005, when you edit a stored procedure by adding the "ALTER" keyword before the stored procedure, but in VS 2003 and VS 2005, clicking the Save button directly saves the changes to the stored procedure. I think the design in SQL Server Management Studio is not very reasonable.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.