Search
 
SCRIPT & CODE EXAMPLE
 

SQL

plsql triggers

CREATE OR REPLACE TRIGGER display_salary_changes 
BEFORE DELETE OR INSERT OR UPDATE ON customers 
FOR EACH ROW 
WHEN (NEW.ID > 0) 
DECLARE 
   sal_diff number; 
BEGIN 
   sal_diff := :NEW.salary  - :OLD.salary; 
   dbms_output.put_line('Old salary: ' || :OLD.salary); 
   dbms_output.put_line('New salary: ' || :NEW.salary); 
   dbms_output.put_line('Salary difference: ' || sal_diff); 
END; 
/
Comment

PREVIOUS NEXT
Code Example
Sql :: copy table in mysql with data 
Sql :: sql distinct with count 
Sql :: connect to ssms with python 
Sql :: oracle sql merge 
Sql :: psql fatal database does not exist 
Sql :: mysql database is not starting in xampp 
Sql :: mysql add column after another 
Sql :: sql trim whitespace 
Sql :: set id count mysql 
Sql :: show all tables postgres 
Sql :: mysql where value is null 
Sql :: mysql on update current_timestamp 
Sql :: add current timestamp in mysql 
Sql :: run mysql file in terminal 
Sql :: mysql check datetime equals date 
Sql :: restart sql server command line linux 
Sql :: generate a random otp in sql server 
Sql :: sql current timestamp table 
Sql :: postgresql size of database 
Sql :: mysql count number of occurrences in a column 
Sql :: sql pad left 0 
Sql :: mysql record group by created date count 
Sql :: oracle apex warn on unsaved changes 
Sql :: drop a recordin sql 
Sql :: How can I tell how many Cores SQL Server is actually using? 
Sql :: nullif postgresql 
Sql :: sum sqlalchemy 
Sql :: SQL Greater Than or Equal to Operator 
Sql :: sql get inserted primary key 
Sql :: como saber si tengo mysql instalado 
ADD CONTENT
Topic
Content
Source link
Name
8+2 =