Login     Register

        Contact Us     Search

XLeratorDB/util Online Documentation

StoredProcedureExists


StoredProcedureExists
 
Updated: 30 October 2008
Use wct.StoredProcedureExists to determine if the specified stored procedure exists in the database.
Syntax
SELECT [westclintech].[wct].[StoredProcedureExists](
   <@Schema, nvarchar(4000),>
   <@StoredProcedureName, nvarchar(4000),>)
 
Arguments
@Schema
is the name of schema containing the stored procedure to test for. @Schema is an expression of the character string data type category. 
@StoredProcedureName
is the name of stored procedure being tested for on the database. @StoredProcedureName is an expression of the character string data type category. 
 
Return Types
bit
Remarks
·         StoredProcedureNameExists simplifies SQL intended to drop a stored procedure if it exists.
Example
 
IF (wct.StoredProcedureExists('wct','myProc') <> 0) DROP PROCEDURE wct.myProc
Here is the result set
----------------------

Command(s) completed successfully



Copyright 2008-2024 Westclintech LLC         Privacy Policy        Terms of Service