Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

database-trigger

MySQL – Trigger for updating same table after insert

September 11, 2023 by Tarik

It seems that you can’t do all this in a trigger. According to the documentation: Within a stored function or trigger, it is not permitted to modify a table that is already being used (for reading or writing) by the statement that invoked the function or trigger. According to this answer, it seems that you … Read more

Categories mysql Tags database-trigger, mysql Leave a comment

How to disable triggers in MySQL?

September 4, 2023 by Tarik

Its not possible to temporarly disable triggers. Do one thing, use one global variable. Trigger will first check value of global variable first. In this case you can change value of global variable to prevent working of trigger.

Categories mysql Tags database-trigger, mysql Leave a comment

Create or replace trigger postgres

January 16, 2023 by Tarik

No way to create or replace a trigger but can do this way DROP TRIGGER IF EXISTS yourtrigger_name on “yourschemaname”.”yourtablename”;

Categories sql Tags database-trigger, ddl, postgresql, sql Leave a comment

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa