1

how can i execute system calls within a trigger? my code currently looks like this:

DELIMITER $$

DROP TRIGGER IF EXISTS trig $$

CREATE
    TRIGGER trig AFTER INSERT ON tbl1
    FOR EACH ROW BEGIN
        system 'echo 123';
END$$

what is the right syntax?

i'm still pretty new to DB, thanks in advance.

3
  • from where are you calling this script? php or shell, or something else? Commented Dec 1, 2011 at 15:55
  • You could write a C user-defined-function, I suppose. dev.mysql.com/doc/refman/5.5/en/adding-udf.html Commented Dec 1, 2011 at 16:00
  • @SavasVedova I'm currently trying to run it from the MySql Workbench. Commented Dec 5, 2011 at 7:28

1 Answer 1

1

You can't execute system calls from SQL trigger. http://bugs.mysql.com/bug.php?id=41094

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.