• vk-kirov (12/1/2010)


    Christian Buettner-167247 (12/1/2010)


    Nils Gustav Stråbø (12/1/2010)


    Both the definition and the comments can be retrieved from sys.syscomments view

    Are you sure about that? I can't see any comments in that view.

    Comments are part of a procedure's definition, so if you retrieve the definiton, you retrieve the comments as well.

    CREATE PROCEDURE QOTD_Test

    AS

    PRINT 'This is a test'; -- this is a comment

    GO

    SELECT "text" FROM sys.syscomments WHERE id = OBJECT_ID('QOTD_Test');

    The result of the SELECT statement contains the "this is a comment" comment 🙂

    i am also go with you

    Every rule in a world of bits and bytes, can be bend or eventually be broken
    MyBlog About Common dialog control
    A Visualizer for viewing SqlCommand object script [/url]