Link to home
Start Free TrialLog in
Avatar of Brogrim
BrogrimFlag for Ireland

asked on

MySQL Trigger

I have created a trigger that is working as expected
 CREATE DEFINER=`root`@`%` TRIGGER trg_DDAI_Service
    AFTER INSERT ON tbl_comments
    FOR EACH ROW BEGIN
 
    INSERT INTO tbl_service_log
    SET 	DDAI_ServicesID = '1',
		DDAI_Services_Date = NOW();

Open in new window


the table tbl_comments also has a column D_ID, How do i include the D_ID value into tbl_service_log
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No points for this, but you might want to learn about the TIMESTAMP column definition.
Avatar of Brogrim

ASKER

Thanks
You are welcome - thanks for the points.