Information Schema TRIGGERED_UPDATE_COLUMNS

This table is available from MariaDB 12.2.

The Information Schema TRIGGERED_UPDATE_COLUMNS table shows columns specified in triggers for update operations.

Columns are displayed only if the user has non-SELECT privileges on the columns.

It contains the following columns:

Column
Description

TRIGGER_CATALOG

Always def in MariaDB.

TRIGGER_SCHEMA

Name of the database containing the trigger.

TRIGGER_NAME

Name of the trigger.

EVENT_OBJECT_CATALOG

Always def in MariaDB

EVENT_OBJECT_SCHEMA

Name of the database containing the table that the trigger is defined on.

EVENT_OBJECT_TABLE

Name of the table that the trigger is defined on.

EVENT_OBJECT_COLUMN

Name of the column that the trigger is defined on.

Examples

CREATE TABLE t (a INT, b INT, c INT);
INSERT INTO t VALUES (1, 2, 3);
CREATE TABLE t1 (a_old INT, b_old INT, a_new INT, b_new INT);
CREATE TABLE t2 (a_old INT, b_old INT, a_new INT, b_new INT); 
CREATE TRIGGER trigger_before_update BEFORE UPDATE OF a, b ON t 
  FOR EACH ROW INSERT INTO t1 VALUES (OLD.a, OLD.b, NEW.a, NEW.b);

SELECT * FROM INFORMATION_SCHEMA.TRIGGERED_UPDATE_COLUMNS\G 
*************************** 1. row ***************************
 TRIGGER_CATALOG: def 
TRIGGER_SCHEMA: test 
TRIGGER_NAME: trigger_before_update 
EVENT_OBJECT_CATALOG: def 
EVENT_OBJECT_SCHEMA: test 
EVENT_OBJECT_TABLE: t 
EVENT_OBJECT_COLUMN: a 
*************************** 2. row *************************** 
TRIGGER_CATALOG: def 
TRIGGER_SCHEMA: test 
TRIGGER_NAME: trigger_before_update 
EVENT_OBJECT_CATALOG: def 
EVENT_OBJECT_SCHEMA: test 
EVENT_OBJECT_TABLE: t 
EVENT_OBJECT_COLUMN: b

This page is licensed: CC BY-SA / Gnu FDL

Last updated

Was this helpful?