|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Checking if a stored procedure existsIs there a way using a SQL Statement to see if a stored procedure exists in
SQL Server? The following will work for SPs, tables, or basically any database object:
if object_id('MyProc') is not null Show quote "RSH" <way_beyond_o***@yahoo.com> wrote in message news:e3NuzSLtFHA.1048@TK2MSFTNGP10.phx.gbl... > > Is there a way using a SQL Statement to see if a stored procedure exists > in SQL Server? > Select 'Exists' where OBJECT_ID(Nameof thsp) IS NOT NULL
Select * from INFORMATION_SCHEMA.Routines where Routine_name = 'nameofyoursp' HTH, Jens suessmeyer. Show quote "RSH" <way_beyond_o***@yahoo.com> wrote in message news:e3NuzSLtFHA.1048@TK2MSFTNGP10.phx.gbl... > > Is there a way using a SQL Statement to see if a stored procedure exists > in SQL Server? > THANKS!!!
Show quote "Jens Süßmeyer" <Jens@remove_this_for_contacting_sqlserver2005.de> wrote in message news:uxi1AhLtFHA.236@TK2MSFTNGP11.phx.gbl... > Select 'Exists' where OBJECT_ID(Nameof thsp) IS NOT NULL > > Select * from INFORMATION_SCHEMA.Routines where Routine_name = > 'nameofyoursp' > > HTH, Jens suessmeyer. > > > > > "RSH" <way_beyond_o***@yahoo.com> wrote in message > news:e3NuzSLtFHA.1048@TK2MSFTNGP10.phx.gbl... >> >> Is there a way using a SQL Statement to see if a stored procedure exists >> in SQL Server? >> > > |
|||||||||||||||||||||||