Search
 
SCRIPT & CODE EXAMPLE
 

SQL

trigger stock phpmyadmin

DELIMITER $$
CREATE TRIGGER invlevel_AUPD
AFTER UPDATE ON invlevel 
FOR EACH ROW
BEGIN
  IF NEW.quantity < 20 THEN 
    INSERT INTO orders (productid, amount)
    SELECT productid, amount 
      FROM reorder 
     WHERE productid = NEW.productid;
  END IF;
END$$
DELIMITER ;
Comment

PREVIOUS NEXT
Code Example
Sql :: convert linq to sql query online 
Sql :: execute oracle ash command 
Sql :: Oracle Function execution 
Sql :: sqlalchemy core in clause 
Sql :: postgres multiple left join causing duplicates jsonb_agg 
Sql :: fetching data from mysqldb 
Sql :: mysql update column with value from another table 
Sql :: compare subqueries oracle 
Sql :: t-sql update table variale 
Sql :: sql multiple column 
Sql :: copy data from cell to cell mysql 
Sql :: code to move ietms from one table to another myswl 
Sql :: Is there a way to use read_sql_query and the query has WHERE column = Variable? 
Sql :: horizontal join sqlite 
Sql :: sort by last two number sql 
Sql :: mysql reset wp_options 
Sql :: NextBirthDayDate 
Sql :: What is the library that should import to use all functional database features in SQLite? 
Sql :: delete record by id sql 
Sql :: Uncomment listen_address=localhost 
Sql :: Laravel: customize or extend notifications - database model 
Sql :: oracle max field name length 
Sql :: añadir clave foranea mysql 
Sql :: okta postgresql 
Sql :: transaction in java mysql 
Sql :: php mysql set db collation 
Sql :: fill up postgres db 
Sql :: suse start MySQL 
Sql :: mysql does sentance contain word 
Sql :: pastashoppen 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =