Câu hỏi phỏng vấn MySQL
Câu hỏi

How many tables can a trigger associate to in...

Câu trả lời

In MySQL, a trigger is associated with exactly one table. It cannot be associated with multiple tables. Therefore, a trigger must be defined for each table where you want similar actions to be taken in response to events like INSERT, UPDATE, or DELETE[1][3][4][5].

Regarding the association of triggers with views, MySQL does not allow triggers to be directly associated with views. Triggers can only be associated with base tables. However, operations performed on updatable views that modify the underlying base tables can indirectly activate triggers associated with those base tables[1][3].

Citations:
[1] https://www.percona.com/blog/triggers-and-updatable-views/
[2] https://www.dbvis.com/thetable/sql-triggers-what-they-are-an...

expert

expert

Gợi ý câu hỏi phỏng vấn

expert

What happens to a trigger in MySQL if an operation which trigger is associated with fails? Does the
trigger execute?

middle

What are key constraints. What different types of constraints are there in MySQL?

junior

Describe BLOB in MySQL. What is it used for?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào