Search
 
SCRIPT & CODE EXAMPLE
 

SQL

Create Trigger in phpMyAdmin

DROP TRIGGER IF EXISTS testTrigger;
CREATE TRIGGER testTrigger 
BEFORE INSERT ON tbl_table1 
FOR EACH ROW 
BEGIN 
  INSERT INTO tbl_table2 VALUES (NEW.id,NEW.name);
END;
Comment

how to make trigger in phpmyadmin

 delimiter // 
 CREATE TRIGGER removeforeing 
  BEFORE DELETE ON products
  FOR EACH ROW BEGIN
    DELETE FROM sales_details WHERE product_code = OLD.product_code;
 END// 
 delimiter ;
Comment

Create Trigger in phpMyAdmin

CREATE TRIGGER before_insert_money BEFORE INSERT ON money
FOR EACH ROW UPDATE accounts SET balance=10.0;
Comment

Create Trigger in phpMyAdmin

delimiter //
CREATE TRIGGER before_insert_money BEFORE INSERT ON money
FOR EACH
ROW
BEGIN
    UPDATE accounts SET balance=10.0;
END;
//
delimiter ;
Comment

Create Trigger in phpMyAdmin

CREATE TRIGGER `before_delete` BEFORE DELETE ON `barcode_master` 
FOR EACH ROW BEGIN 
UPDATE library_emp_master SET job_type = 1 WHERE barcode_no =   OLD.barcode_no; 
END;
Comment

Create Trigger in phpMyAdmin

delimiter $$
CREATE TRIGGER copy_pid AFTER INSERT on upload FOR EACH ROW 

BEGIN

INSERT INTO rating (uid,pid) VALUES (NEW.username,NEW.id);

END$$
delimiter ;
Comment

Create Trigger in phpMyAdmin

CREATE TRIGGER testTrigger 
BEFORE INSERT ON tbl_table1 
FOR EACH ROW 
BEGIN 
    INSERT INTO tbl_table2 (id,name) values (NEW.id,NEW.name); 
END
Comment

Create Trigger in phpMyAdmin

CREATE TRIGGER after_update
       AFTER UPDATE ON hodm
       FOR EACH ROW 

       INSERT INTO hodm_log
       SET log_action = 'update',
        user_name = NEW.user_name,
           log_timestamp = NOW();
Comment

how to make trigger in phpmyadmin

ALTER TABLE sales_details
ADD FOREIGN KEY fk_product_code(product_code)
REFERENCES products(product_code)
ON DELETE CASCADE;
Comment

Create Trigger in phpMyAdmin

CREATE TABLE contacts
( contact_id INT(11) NOT NULL AUTO_INCREMENT,
  last_name VARCHAR(30) NOT NULL,
  first_name VARCHAR(25),
  birthday DATE,
  CONSTRAINT contacts_pk PRIMARY KEY (contact_id)
);
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql add 24 hours to datetime 
Sql :: parent: [Error: SQLITE_READONLY: attempt to write a readonly database] { 
Sql :: sql multiple column 
Sql :: trigger value from maltiple table to single table mysql 
Sql :: sql multiple into 
Sql :: creating h2 database in relative directory eclopse 
Sql :: code to move ietms from one table to another myswl 
Sql :: tornado_mysql 
Sql :: mssql get running queries by spid 
Sql :: add plugins to mysql workbench 
Sql :: update top 100 order by sql server 
Sql :: db: vertex.nedb() 
Sql :: create user oracle hash by value 
Sql :: mysql check if entry exists 
Sql :: What is the library that should import to use all functional database features in SQLite? 
Sql :: grepper sql workbench download 
Sql :: how to import sqlite driver class in java using maven 
Sql :: c# select mssql 
Sql :: kill thread 
Sql :: group_concat only returns one row 
Sql :: create-table-with-index-organization 
Sql :: sql to migration codeigniter online 
Sql :: triggers in mysql 
Sql :: oracle create chain rule 
Sql :: grouping function in mysql 
Sql :: openquery update linked server 
Sql :: subconjuntos SQL 
Sql :: DAX Code Snippet To Seclect Top Rows In Query 
Sql :: sql server separar numeros por comas miles 
Sql :: show specific partition hive query 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =