Search code examples
mysqldatabasecomments

How can I add comments in MySQL?


I want to add comment in SQL code. How can I do this? I'm using MySQL.


Solution

  • Several ways:

    # Comment
    -- Comment
    /* Comment */
    

    Remember to put the space after --.

    See the documentation.