Search
 
SCRIPT & CODE EXAMPLE
 

SQL

postgres create trigger if not exists

-- SYNTAX
CRRATE TRIGGER trigger_name {BEFORE|AFTER|INSTEAD OF} { event [ OR ... ] }
ON table_name
[ FROM referenced_table_name ]
[ NOT DEFERRABLE | [ DEFERRABLE ] [ INITIALLY IMMEDIATE | INITIALLY DEFERRED ] ]
[ REFERENCING { { OLD | NEW } TABLE [ AS ] transition_relation_name } [ ... ] ]
[ FOR [ EACH ] { ROW | STATEMENT } ]
[ WHEN ( condition ) ]
EXECUTE {FUNCTION|PROCEDURE} function_name ( arguments )

-- EXAMPLE
CREATE TRIGGER test_trigger
  AFTER INSERT
  ON test_table
  FOR EACH ROW
  EXECUTE PROCEDURE test();
Comment

PREVIOUS NEXT
Code Example
Sql :: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails 
Sql :: how to increase the width of the screen in oracle 
Sql :: mysql in clausule string array 
Sql :: sql server epoch to datetime 
Sql :: creashed table mysql 
Sql :: convert minutes to hours in sql 
Sql :: pl sql command line run 
Sql :: oracle swap partition 
Sql :: reset postgresql password windows 
Sql :: sql is null and is not null 
Sql :: mysql trim characters 
Sql :: show create table in postgresql 
Sql :: access refused mysql xampp server 
Sql :: data types mysql vs postgresql 
Sql :: get substract count sql 
Sql :: fatal error uncaught mysqli_sql_exception 
Sql :: character count sql 
Sql :: joining tables in sql 
Sql :: mysql with docker 
Sql :: TSQL convert csv to table 
Sql :: execution time of mysql query 
Sql :: oracle select into and inner join 
Sql :: create view in oracle sql 
Sql :: non relational database 
Sql :: sql joins in python 
Sql :: oracle privileges 
Sql :: how to order result of subquery in select 
Sql :: search starting with mysql 
Sql :: python sqlalcahmey compare datetime 
Sql :: creating a simple notify in postgresql 
ADD CONTENT
Topic
Content
Source link
Name
2+8 =