I've created a table like this:
CREATE TABLE table_name (
name VARCHAR2(20)
);
After that, I've created a trigger, which before every insert, has to write the users name:
SET SERVEROUTPUT ON;
CREATE OR REPLACE TRIGGER bi_trigger
BEFORE INSERT ON table_name
FOR EACH ROW
ENABLE
DECLARE
v_user VARCHAR2(20);
BEGIN
SELECT user INTO v_user FROM dual;
DBMS_OUTPUT.PUT_LINE('You inserted a row, ' || v_user);
END;
But, after inserting something into my table, the requested line with the user's name doesn't appear. What am I missing?
INSERT INTO table_name VALUES('qwerty');