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 3799156
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T13:41:18+00:00 2026-05-19T13:41:18+00:00

DELIMITER | CREATE TRIGGER RV1 after insert on Iscr for each row call ProcRV1(new.Usere,new.Sub);

  • 0
DELIMITER |

CREATE TRIGGER RV1       
after insert on Iscr 
for each row 
call ProcRV1(new.Usere,new.Sub);

create procedure ProcRV1(nUsere varchar(15),nSub varchar(15))

delete from Iscr

where Usere=nUsere && Sub=nSub && Usere=Sub

|

with this on table Iscr i get ERROR 1442 when i try to insert rows
any help ??

thanks

  • 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-19T13:41:19+00:00Added an answer on May 19, 2026 at 1:41 pm
        DELIMITER |
    
        create procedure ProcRV1(nUsere varchar(15),nSub varchar(15))
        BEGIN
            delete from Iscr where Usere=nUsere && Sub=nSub && Usere=Sub;
        END
        |
    
        CREATE TRIGGER RV1       
            after insert on Iscr 
            for each row 
            BEGIN
                call ProcRV1(new.Usere,new.Sub);
            END
        |
    
        DELIMITER ;
    

    Edit: on seeing your SPs now:

    OK, So you are trying to delete rows from the current table while inserting in it. MySQL does not allow that. But there must be a trick. Something like done here http://crazytoon.com/2008/03/03/mysql-error-1442-hy000-cant-update-table-t1-in-stored-functiontrigger-because-it-is-already-used-by-statement-which-invoked-this-stored-functiontrigger/

    Refer this: http://dev.mysql.com/doc/refman/5.0/en/stored-program-restrictions.html

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

DELIMITER $$ CREATE TRIGGER stock_empty AFTER UPDATE on products FOR EACH ROW DELETE FROM
DELIMITER $$ create trigger mytable_check before insert on test.mytable for each row begin if
DELIMITER // DROP TRIGGER insert_orderinward_trig; // CREATE TRIGGER insert_orderinward_trig AFTER INSERT ON tblm_tlmngorderinward FOR
I am running delimiter // create trigger beforeYourTableUpdate BEFORE UPDATE on YourTable FOR EACH
I've got a mySql stored procedure that looks like this-- delimiter | create procedure
mysql ver is 5.0.67 my trigger code is : DELIMITER // CREATE TRIGGER upd_price
hey guys,i'm new to mysql.here i wrote a procedure that error occured: DELIMITER $$
I have the following MySQL query: DELIMITER // CREATE PROCEDURE InsertResult (IN winnerID INT,
Through Schema API (file mymodule.install in Folder sites\all\modules\mymodule). trigger in mysql: delimiter | CREATE
Look at this code: DELIMITER $$ DROP TRIGGER IF EXISTS `after_product_insert` $$ CREATE TRIGGER

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.