Short answer is No. Triggers are triggered with INSERT
, UPDATE
or DELETE
.
Possible solution for this. rather rare scenario:
- First, write some stored procedures
that do the
SELECT
s you want on
table X.
- Then, restrict all users to use only
these stored procedures and do not
allow them to directly use
SELECT
on table
X.
- Then alter the stored procedures to
also call a stored procedure that
performs the action you want
(
INSERT
or whatever).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…