You must Sign In to post a response.
  • Category: SQL Server

    Find column used in stored procedure in sql server

    Hi All,

    How to find column used in stored procedure in sql server.
  • #746386
    Hi,

    Use below script to find column used in stored procedure


    SELECT obj.name SPName,
    sc.text SPText
    FROM sys.syscomments sc
    INNER JOIN sys.objects obj
    ON sc.id = obj.object_id
    WHERE sc.text LIKE '% <Column Name> %'
    AND type = 'P'

  • #746401
    Hi,

    Please elaborate your requirement then only we provide some what better solution to resolve the issue.

    --------------------------------------------------------------------------------
    Give respect to your work, Instead of trying to impress your boss.

    N@veen
    Blog : http://naveens-dotnet.blogspot.in/

  • #747078
    try using information_schema.routines to get details of stored procedures


  • Sign In to post your comments