Skip to content

Instantly share code, notes, and snippets.

@scan
Created November 30, 2012 18:48
Show Gist options
  • Save scan/4177684 to your computer and use it in GitHub Desktop.
Save scan/4177684 to your computer and use it in GitHub Desktop.
CREATE TRIGGER updated AFTER UPDATE ON users
FOR EACH ROW BEGIN
UPDATE users SET `updated`=CURRENT_TIMESTAMP WHERE id=NEW.id;
END;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment