5. Before delete trigger Master_ochirish_oldin triggerini yaratamiz;
17.15 – rasm. Master_ochirish_oldin triggerini yaratish
Yaratgan triggerimizni ishlatamiz va natijasini master0 jadvalida ko’ramiz; ya’ni biz trigger yordamida ID 5 ga teng satrni o’chirdik.
17.16 – rasm. Master0 jadvalidan satr o`chirish natijasi
6. After delete trigger 6.1. Master_ochirish_keyin triggerini yaratamiz;
– rasm. Master_ochirish_keyin triggerini yaratish
Yaratgan triggerimizni ishlatamiz va natijasini master0 jadvalida ko’ramiz; yani biz trigger yordamida ID 1 ga teng satrni ham o’chirdik.
17.18 – rasm. Master0 jadvalidan satr o`chirish natijasi
7. drop trigger: 7.1. Oldingi misollarda yaratgan master_ochirish_oldin triggerini o’chiramiz;
– rasm. Ma’lumotlar bazasidagi triggerni o’chirish
Vazifalar 1.Yuqorida ko`rsatilganlardan foydalanib tanlangan variyantga muvofiq mavzu uchun MySQL da protseduralar yarating va undan foydalaning.
2.Bajarilgan ishlar haqida hisobot tayyorlang (1-2-ilovalarga qarang).
Nazoratsavollari Triggerni yaratish qanday amalga oshiriladi ?
Protseduralarni yaratish qanday amalga oshiriladi?