I am trying to run an INSERT statement on table X each time I SELECT any record from table Y is there anyway that I can accomplish that using MySQL only?
Something like triggers?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
Short answer is No. Triggers are triggered with
INSERT,UPDATEorDELETE.Possible solution for this. rather rare scenario:
that do the
SELECTs you want ontable X.
these stored procedures and do not
allow them to directly use
SELECTon tableX.
also call a stored procedure that
performs the action you want
(
INSERTor whatever).