I want to insert new table in table angajati and update utilizator column angajat_id with id inserted in...












-1














INSERT INTO angajat(id_functie,id_departament,utilizator_id) 
VALUES(NEW.id_functie, NEW.departament_id,NEW.id);

Update utilizator
set id_angajat =angajat.NEW.id
WHERE utilizator.id=angajat.new.utilizator_id;


I don't know why this does not work.










share|improve this question









New contributor




S.Albu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as unclear what you're asking by Philᵀᴹ, Akina, Michael Green, Colin 't Hart, mustaccio 2 hours ago


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.











  • 1




    You want to do this inside a trigger? Or something else?
    – Philᵀᴹ
    4 hours ago










  • Please edit the question to include the actual error message in full.
    – Michael Green
    3 hours ago
















-1














INSERT INTO angajat(id_functie,id_departament,utilizator_id) 
VALUES(NEW.id_functie, NEW.departament_id,NEW.id);

Update utilizator
set id_angajat =angajat.NEW.id
WHERE utilizator.id=angajat.new.utilizator_id;


I don't know why this does not work.










share|improve this question









New contributor




S.Albu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as unclear what you're asking by Philᵀᴹ, Akina, Michael Green, Colin 't Hart, mustaccio 2 hours ago


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.











  • 1




    You want to do this inside a trigger? Or something else?
    – Philᵀᴹ
    4 hours ago










  • Please edit the question to include the actual error message in full.
    – Michael Green
    3 hours ago














-1












-1








-1







INSERT INTO angajat(id_functie,id_departament,utilizator_id) 
VALUES(NEW.id_functie, NEW.departament_id,NEW.id);

Update utilizator
set id_angajat =angajat.NEW.id
WHERE utilizator.id=angajat.new.utilizator_id;


I don't know why this does not work.










share|improve this question









New contributor




S.Albu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











INSERT INTO angajat(id_functie,id_departament,utilizator_id) 
VALUES(NEW.id_functie, NEW.departament_id,NEW.id);

Update utilizator
set id_angajat =angajat.NEW.id
WHERE utilizator.id=angajat.new.utilizator_id;


I don't know why this does not work.







mysql






share|improve this question









New contributor




S.Albu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




S.Albu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 4 hours ago









Philᵀᴹ

25.3k65389




25.3k65389






New contributor




S.Albu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 4 hours ago









S.AlbuS.Albu

1




1




New contributor




S.Albu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





S.Albu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






S.Albu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




put on hold as unclear what you're asking by Philᵀᴹ, Akina, Michael Green, Colin 't Hart, mustaccio 2 hours ago


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






put on hold as unclear what you're asking by Philᵀᴹ, Akina, Michael Green, Colin 't Hart, mustaccio 2 hours ago


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.










  • 1




    You want to do this inside a trigger? Or something else?
    – Philᵀᴹ
    4 hours ago










  • Please edit the question to include the actual error message in full.
    – Michael Green
    3 hours ago














  • 1




    You want to do this inside a trigger? Or something else?
    – Philᵀᴹ
    4 hours ago










  • Please edit the question to include the actual error message in full.
    – Michael Green
    3 hours ago








1




1




You want to do this inside a trigger? Or something else?
– Philᵀᴹ
4 hours ago




You want to do this inside a trigger? Or something else?
– Philᵀᴹ
4 hours ago












Please edit the question to include the actual error message in full.
– Michael Green
3 hours ago




Please edit the question to include the actual error message in full.
– Michael Green
3 hours ago










0






active

oldest

votes

















0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

Ronny Ackermann

Köttigit

MySQL 8.0.15 starts normally but any connection hangs