How to check if stored procedure exists or not in ms sql server database

In this programming tutorial you will learn how to check if stored procedure exists or not in ms sql server database. It is quite easy in ms sql server with the help of a sp_helptext command. So let's have a look over it.
How to check if stored procedure exists or not in ms sql server database
sp_helptext yourspname
Yeah that's it. If stored procedure exists then this command will give you the text of stored procedure else it will will give you the following error

The object 'blah blah' does not exist in database 'blah blah' or is invalid for this operation.

I love your feedback.

0 comments: