CREATE TABLE things (
    id   INTEGER PRIMARY KEY AUTO_INCREMENT,
    name VARCHAR(255) NOT NULL,
    tag  VARCHAR(255)
);

CREATE TRIGGER things_bi BEFORE INSERT ON things
    FOR EACH ROW SET NEW.tag = CONCAT('DB:', NEW.name);

CREATE TABLE plain (
    id   INTEGER PRIMARY KEY AUTO_INCREMENT,
    name VARCHAR(255) NOT NULL
);
