Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6880691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:00:24+00:00 2026-05-27T05:00:24+00:00

If I create a trigger with CREATE TRIGGER syntax in MySQL, how can I

  • 0

If I create a trigger with CREATE TRIGGER syntax in MySQL, how can I attach a comment to it, which describes it? I mean in the declaration or after it’s the same to me.

I can’t figure it out. With tables you add COMMENT = 'Wonderful table with users inside'; at the end of the declaration. But how do you add comments to a trigger?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:00:25+00:00Added an answer on May 27, 2026 at 5:00 am

    You cannot attach a comment to a trigger.

    You can however put comments in the trigger body.

    If you type the in body comments like /** comment **/
    You can extract these comments with the following query:

    SELECT
      SUBSTRING(b.body, b.start, (b.eind - b.start)) as comment 
    FROM (
      SELECT
        a.body 
        ,locate('/**',a.body) as start
        ,locate('**/',a.body) as eind
      FROM (
        SELECT t.ACTION_STATEMENT as body FROM information_schema.triggers t 
        WHERE t.TRIGGER_NAME like %aname% 
      ) a
    ) b
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to set up a MySQL trigger, but I can't figure out how
I´m trying to create a trigger on MySQL but I´m having a syntax problem,
I have this code (mySql 5.1.36) CREATE TRIGGER problem_description AFTER INSERT ON problem_description FOR
I need to create Trigger for delete action which backsup all fields old value
Let's say I've got a trigger like this: CREATE TRIGGER trigger1 ON [dbo].[table1] AFTER
There is something wrong with this trigger. But what? CREATE TRIGGER MYCOOLTRIGGER AFTER INSERT
I am trying to create Update trigger which should be invoked only if the
With MySQL 5.1.43. I am trying to create a trigger like this: USE `databaseA`;
I am trying to create an update trigger in MySQL Community Server 5.5.16 but
CREATE TRIGGER membership AFTER INSERT ON jos_config5 FOR EACH ROW BEGIN INSERT INTO jos_config4(

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.