How to check for a stored procedure

  • When i want to know about a certain coloumn exist, i use:

    SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'licensfile' AND COLUMN_NAME = 'Norm_Basic'

    But how to find out, about my stored procedure ep_change does exist?

    Best regards

    Edvard Korsbæk

  • IF EXISTS (SELECT 1 FROM sys.procedures WHERE name = 'ep_change')

    PRINT 'Procedure exists'

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply