Search
 
SCRIPT & CODE EXAMPLE
 

SQL

oracle trigger

CREATE OR REPLACE TRIGGER my_schema.trigger_name AFTER LOGON ON DATABASE
BEGIN
    INSERT INTO my_log_table
    VALUES (USER AS CONNECTED_USER,
        sys_context('USERENV', 'SESSIONID') AS SESSION_ID,
        substr(sys_context('USERENV', 'OS_USER'), 1, 50) AS OS_USER,
        substr(sys_context('USERENV', 'HOST'), 1, 30) AS HOST,
        SYSDATE AS LOGON_DATE);
END;
ALTER TRIGGER my_schema.trigger_name ENABLE;
Comment

oracle compile trigger

alter trigger MY_SCHEMA.TRIGGER_NAME compile;
Comment

PREVIOUS NEXT
Code Example
Sql :: Write a query to create an empty table from an existing table? 
Sql :: spring datasource properties mysql 
Sql :: sql query duplicate rows 
Sql :: change column name sql server management studio 
Sql :: postgres copy table from one schema to another 
Sql :: show all database inside postgresql 
Sql :: connectionstring mysql c# 
Sql :: sql identity column reset 
Sql :: mysql error 1251 
Sql :: SQL Count UNIQUE Rows 
Sql :: trouver doublons sql 
Sql :: oracle insert into 
Sql :: display 2 numbers after decimal mysql 
Sql :: how to find lowest in sql 
Sql :: declare variables sql 
Sql :: SQL Modify Column in a Table -MySQL 
Sql :: sql extract numbers from string 
Sql :: pad zero sql server 
Sql :: alter schema sql server 
Sql :: java string to sql timestamp 
Sql :: get number of table colums in sql query 
Sql :: replace null in sql 
Sql :: install mysql 5.7 
Sql :: Msg 241, Level 16, State 1, Line 12 Conversion failed when converting date and/or time from character string. 
Sql :: update table disable constraint 
Sql :: kill session inactive oracle 
Sql :: mysql shell clear screen 
Sql :: getdate function in postgresql 
Sql :: how to uninstall postgresql 13 on mac 
Sql :: Parsing XML IN SQL Server 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =